[virt-tools-list] [PATCH virt-install 2/2] Don't generate port and tlsport parameters in xml if spice gl is enabled

Lin Ma lma at suse.com
Wed May 4 09:33:27 UTC 2016


spice gl + tcp port is disallowed by qemu commit 569a93c, So in this
case we don't generate port and tlsport parameters in domain xml.

Signed-off-by: Lin Ma <lma at suse.com>
---
 tests/cli-test-xml/compare/virt-install-spice-gl.xml | 2 +-
 virtinst/guest.py                                    | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/cli-test-xml/compare/virt-install-spice-gl.xml b/tests/cli-test-xml/compare/virt-install-spice-gl.xml
index 44a6700..0407cd2 100644
--- a/tests/cli-test-xml/compare/virt-install-spice-gl.xml
+++ b/tests/cli-test-xml/compare/virt-install-spice-gl.xml
@@ -46,7 +46,7 @@
       <model type="virtio"/>
     </interface>
     <input type="tablet" bus="usb"/>
-    <graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
+    <graphics type="spice">
       <gl enable="yes"/>
       <image compression="off"/>
     </graphics>
diff --git a/virtinst/guest.py b/virtinst/guest.py
index ab6dcba..e92c24a 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -1132,6 +1132,12 @@ class Guest(XMLBuilder):
             if dev.type == "default":
                 _set_type(dev)
 
+            # spice gl + tcp port is disallowed by qemu commit 569a93c.
+            # So we dont generate port/tlsport parameters in domain xml.
+            if dev.type == "spice" and self.has_gl():
+                dev.port = None
+                dev.tlsPort = None
+
             if (dev.type == "spice" and
                 not self.conn.is_remote() and
                 self.conn.check_support(
-- 
2.8.1




More information about the virt-tools-list mailing list