Add support for libvirt domain <smbios> XML config
On x86 platforms the SMBIOS data tables can be customized
using the <smbios> XML config.
For example, to populate them based on the <sysinfo> data
<smbios mode="sysinfo"/>
Or to copy the host's SMBIOS
<smbios mode="host"/>
Change-Id: Ia4e6c1d9b0d66c58700ccf0f0fd97fa302aba64d
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
@@ -303,6 +303,17 @@ class LibvirtConfigGuestCPUTest(LibvirtConfigBaseTest):
|
||||
""")
|
||||
|
||||
|
||||
class LibvirtConfigGuestSMBIOSTest(LibvirtConfigBaseTest):
|
||||
|
||||
def test_config_simple(self):
|
||||
obj = config.LibvirtConfigGuestSMBIOS()
|
||||
|
||||
xml = obj.to_xml()
|
||||
self.assertXmlEqual(xml, """
|
||||
<smbios mode="sysinfo"/>
|
||||
""")
|
||||
|
||||
|
||||
class LibvirtConfigGuestSysinfoTest(LibvirtConfigBaseTest):
|
||||
|
||||
def test_config_simple(self):
|
||||
@@ -745,6 +756,7 @@ class LibvirtConfigGuestTest(LibvirtConfigBaseTest):
|
||||
obj.uuid = "b38a3f43-4be2-4046-897f-b67c2f5e0147"
|
||||
obj.os_type = "linux"
|
||||
obj.os_boot_dev = "hd"
|
||||
obj.os_smbios = config.LibvirtConfigGuestSMBIOS()
|
||||
obj.acpi = True
|
||||
obj.apic = True
|
||||
|
||||
@@ -778,6 +790,7 @@ class LibvirtConfigGuestTest(LibvirtConfigBaseTest):
|
||||
<os>
|
||||
<type>linux</type>
|
||||
<boot dev="hd"/>
|
||||
<smbios mode="sysinfo"/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
|
||||
Reference in New Issue
Block a user