[virt-tools-list] [PATCH 3/5] virtinst: Add --smbios command line option

Charles Arnold carnold at suse.com
Tue Jul 12 19:29:32 UTC 2016


Add a sysinfo element to the guest XML for smbios information

Signed-off-by: Charles Arnold <carnold at suse.com>

diff --git a/virtinst/guest.py b/virtinst/guest.py
index 6a42536..173aa04 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -52,6 +52,7 @@ from .idmap import IdMap
 from .osxml import OSXML
 from .pm import PM
 from .seclabel import Seclabel
+from .sysinfo import SYSInfo
 from .xmlbuilder import XMLBuilder, XMLProperty, XMLChildProperty
 
 
@@ -106,7 +107,7 @@ class Guest(XMLBuilder):
         "vcpus", "curvcpus", "vcpu_placement", "cpuset",
         "numatune", "bootloader", "os", "idmap",
         "features", "cpu", "clock", "on_poweroff", "on_reboot", "on_crash",
-        "resource", "pm", "emulator", "_devices", "seclabels"]
+        "resource", "pm", "emulator", "_devices", "seclabels", "sysinfo"]
 
     def __init__(self, *args, **kwargs):
         XMLBuilder.__init__(self, *args, **kwargs)
@@ -212,6 +213,7 @@ class Guest(XMLBuilder):
     memoryBacking = XMLChildProperty(DomainMemorybacking, is_single=True)
     idmap = XMLChildProperty(IdMap, is_single=True)
     resource = XMLChildProperty(DomainResource, is_single=True)
+    sysinfo = XMLChildProperty(SYSInfo, is_single=True)
 
 
     ###############################






More information about the virt-tools-list mailing list