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

Charles Arnold carnold at suse.com
Tue Jul 12 19:30:02 UTC 2016


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

diff --git a/tests/clitest.py b/tests/clitest.py
index b63a92a..52b9cd1 100644
--- a/tests/clitest.py
+++ b/tests/clitest.py
@@ -427,6 +427,10 @@ c.add_compare("""--pxe \
 --memorybacking size=1,unit='G',nodeset='1,2-5',nosharepages=yes,locked=yes \
 --features acpi=off,eoi=on,privnet=on,hyperv_spinlocks=on,hyperv_spinlocks_retries=1234,vmport=off,pmu=off \
 --clock offset=utc,hpet_present=no,rtc_tickpolicy=merge \
+--smbios type=0,vendor=Acme,version=1.0.0,date=01/01/1970,release=10.22 \
+--smbios type=1,manufacturer=manufacturer,product=name,version=version_string,serial=serial_number,uuid=00000000-1111-4222-a333-444444444444,sku=oem_sku,family=oem_family \
+--smbios type=2,manufacturer=manufacturer,product=name,version=version_string,serial=serial_number,asset=asset_tag,location=location \
+\
 --pm suspend_to_mem=yes,suspend_to_disk=no \
 --resource partition=/virtualmachines/production \
 --events on_poweroff=destroy,on_reboot=restart,on_crash=preserve,on_lockfailure=ignore \
diff --git a/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml b/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml
index c50125b..f430568 100644
--- a/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml
+++ b/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml
@@ -36,6 +36,7 @@
     <boot dev="fd"/>
     <boot dev="hd"/>
     <boot dev="network"/>
+    <smbios mode="sysinfo"/>
     <bootmenu enable="no"/>
   </os>
   <idmap>
@@ -122,6 +123,30 @@
   <seclabel type="static" model="selinux" relabel="yes">
     <label>system_u:object_r:svirt_image_t:s0:c100,c200</label>
   </seclabel>
+  <sysinfo type="smbios">
+    <bios>
+      <entry name="date">01/01/1970</entry>
+      <entry name="vendor">Acme LLC</entry>
+      <entry name="version">1.2.3</entry>
+      <entry name="release">10.22</entry>
+    </bios>
+    <system>
+      <entry name="sku">abc-123</entry>
+      <entry name="product">Computer</entry>
+      <entry name="uuid">00000000-1111-2222-3333-444444444444</entry>
+      <entry name="family">Server</entry>
+      <entry name="version">3.2.1</entry>
+      <entry name="serial">123456789</entry>
+      <entry name="manufacturer">Acme Inc.</entry>
+    </system>
+    <baseBoard>
+      <entry name="product">Motherboard</entry>
+      <entry name="location">Chassis</entry>
+      <entry name="version">A01</entry>
+      <entry name="asset">Tag</entry>
+      <entry name="manufacturer">Acme Corp.</entry>
+    </baseBoard>
+  </sysinfo>
   <on_lockfailure>ignore</on_lockfailure>
 </domain>
 <domain type="kvm">
@@ -162,6 +187,7 @@
     <boot dev="fd"/>
     <boot dev="hd"/>
     <boot dev="network"/>
+    <smbios mode="sysinfo"/>
     <bootmenu enable="no"/>
   </os>
   <idmap>
@@ -248,5 +274,29 @@
   <seclabel type="static" model="selinux" relabel="yes">
     <label>system_u:object_r:svirt_image_t:s0:c100,c200</label>
   </seclabel>
+  <sysinfo type="smbios">
+    <bios>
+      <entry name="date">01/01/1970</entry>
+      <entry name="vendor">Acme LLC</entry>
+      <entry name="version">1.2.3</entry>
+      <entry name="release">10.22</entry>
+    </bios>
+    <system>
+      <entry name="sku">abc-123</entry>
+      <entry name="product">Computer</entry>
+      <entry name="uuid">00000000-1111-2222-3333-444444444444</entry>
+      <entry name="family">Server</entry>
+      <entry name="version">3.2.1</entry>
+      <entry name="serial">123456789</entry>
+      <entry name="manufacturer">Acme Inc.</entry>
+    </system>
+    <baseBoard>
+      <entry name="product">Motherboard</entry>
+      <entry name="location">Chassis</entry>
+      <entry name="version">A01</entry>
+      <entry name="asset">Tag</entry>
+      <entry name="manufacturer">Acme Corp.</entry>
+    </baseBoard>
+  </sysinfo>
   <on_lockfailure>ignore</on_lockfailure>
 </domain>





More information about the virt-tools-list mailing list