[virt-tools-list] [PATCH 2/5] virtinst: check minimum qemu/libvirt for spice+gl

Marc-André Lureau marcandre.lureau at redhat.com
Thu Apr 28 12:22:08 UTC 2016


Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
 virtinst/guest.py   | 5 +++++
 virtinst/support.py | 1 +
 2 files changed, 6 insertions(+)

diff --git a/virtinst/guest.py b/virtinst/guest.py
index ab6dcba..5824e87 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -1141,6 +1141,11 @@ class Guest(XMLBuilder):
                 if dev.image_compression is None:
                     dev.image_compression = "off"
 
+            if (dev.type == "spice" and
+                 not self.conn.check_support(
+                     self.conn.SUPPORT_CONN_SPICE_GL)):
+                 raise ValueError(_("Host does not support spice GL"))
+
     def _add_spice_channels(self):
         if self.skip_default_channel:
             return
diff --git a/virtinst/support.py b/virtinst/support.py
index 1071750..1925986 100644
--- a/virtinst/support.py
+++ b/virtinst/support.py
@@ -311,6 +311,7 @@ SUPPORT_CONN_VCPU_PLACEMENT = _make(
 SUPPORT_CONN_MEM_STATS_PERIOD = _make(
     function="virDomain.setMemoryStatsPeriod",
     version="1.1.1", hv_version={"qemu": 0})
+SUPPORT_CONN_SPICE_GL = _make(version="1.3.3", hv_version={"qemu": "2.5.92"})
 
 
 # This is for disk <driver name=qemu>. xen supports this, but it's
-- 
2.7.4




More information about the virt-tools-list mailing list