[virt-tools-list] [PATCH] virt-install:support --features hyperv_synic=(on/off)

Venkat Datta N H nhvenkatdatta at gmail.com
Thu Mar 30 18:17:15 UTC 2017


From: venkat <nhvenkatdatta at gmail.com>

---
 tests/cli-test-xml/compare/virt-install-singleton-config-2.xml | 2 ++
 tests/clitest.py                                               | 2 +-
 virtinst/cli.py                                                | 1 +
 virtinst/domainfeatures.py                                     | 1 +
 4 files changed, 5 insertions(+), 1 deletion(-)

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 a12f75a..5fa0f24 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
@@ -78,6 +78,7 @@
     <hyperv>
       <reset state="on"/>
       <spinlocks state="on" retries="1234"/>
+      <synic state="on"/>
     </hyperv>
     <vmport state="off"/>
   </features>
@@ -231,6 +232,7 @@
     <hyperv>
       <reset state="on"/>
       <spinlocks state="on" retries="1234"/>
+      <synic state="on"/>
     </hyperv>
     <vmport state="off"/>
   </features>
diff --git a/tests/clitest.py b/tests/clitest.py
index cd2bfc8..1445e40 100644
--- a/tests/clitest.py
+++ b/tests/clitest.py
@@ -426,7 +426,7 @@ c.add_compare("""--pxe \
 --memtune hard_limit=10,soft_limit=20,swap_hard_limit=30,min_guarantee=40 \
 --blkiotune weight=100,device_path=/home/test/1.img,device_weight=200 \
 --memorybacking size=1,unit='G',nodeset='1,2-5',nosharepages=yes,locked=yes \
---features acpi=off,eoi=on,privnet=on,hyperv_reset=on,hyperv_spinlocks=on,hyperv_spinlocks_retries=1234,vmport=off,pmu=off \
+--features acpi=off,eoi=on,privnet=on,hyperv_synic=on,hyperv_reset=on,hyperv_spinlocks=on,hyperv_spinlocks_retries=1234,vmport=off,pmu=off \
 --clock offset=utc,hpet_present=no,rtc_tickpolicy=merge \
 --sysinfo type=smbios,bios_vendor="Acme LLC",bios_version=1.2.3,bios_date=01/01/1970,bios_release=10.22 \
 --sysinfo type=smbios,system_manufacturer="Acme Inc.",system_product=Computer,system_version=3.2.1,system_serial=123456789,system_uuid=00000000-1111-2222-3333-444444444444,system_sku=abc-123,system_family=Server \
diff --git a/virtinst/cli.py b/virtinst/cli.py
index 248eb41..ac4b469 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -1681,6 +1681,7 @@ ParserFeatures.add_arg("hyperv_relaxed", "hyperv_relaxed", is_onoff=True)
 ParserFeatures.add_arg("hyperv_spinlocks", "hyperv_spinlocks", is_onoff=True)
 ParserFeatures.add_arg("hyperv_spinlocks_retries",
                        "hyperv_spinlocks_retries")
+ParserFeatures.add_arg("hyperv_synic", "hyperv_synic", is_onoff=True)
 
 ParserFeatures.add_arg("vmport", "vmport", is_onoff=True)
 ParserFeatures.add_arg("kvm_hidden", "kvm_hidden", is_onoff=True)
diff --git a/virtinst/domainfeatures.py b/virtinst/domainfeatures.py
index e654dbc..270f63a 100644
--- a/virtinst/domainfeatures.py
+++ b/virtinst/domainfeatures.py
@@ -48,6 +48,7 @@ class DomainFeatures(XMLBuilder):
     hyperv_spinlocks = XMLProperty("./hyperv/spinlocks/@state", is_onoff=True)
     hyperv_spinlocks_retries = XMLProperty("./hyperv/spinlocks/@retries",
                                            is_int=True)
+    hyperv_synic = XMLProperty("./hyperv/synic/@state", is_onoff=True)
 
     vmport = XMLProperty("./vmport/@state", is_onoff=True,
                          default_name="default", default_cb=lambda s: False)
-- 
2.7.4




More information about the virt-tools-list mailing list