Only use spice on x86

qemu isn't compiled with spice support for non-x86

Reported-by: Kevin Zhao <kevinzs@linux.vnet.ibm.com>
This commit is contained in:
Cole Robinson
2015-12-15 21:06:19 +08:00
parent 95fd32dffd
commit 33ca0fff7d
2 changed files with 4 additions and 10 deletions

View File

@ -23,21 +23,14 @@
<source bridge="eth0"/>
<mac address="00:11:22:33:44:55"/>
</interface>
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
<image compression="off"/>
</graphics>
<graphics type="vnc" port="-1"/>
<console type="pty"/>
<channel type="unix">
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
<channel type="spicevmc">
<target type="virtio" name="com.redhat.spice.0"/>
</channel>
<video>
<model type="vga"/>
</video>
<redirdev bus="usb" type="spicevmc"/>
<redirdev bus="usb" type="spicevmc"/>
</devices>
</domain>

View File

@ -1119,8 +1119,9 @@ class Guest(XMLBuilder):
gtype = self.default_graphics_type
logging.debug("Using default_graphics=%s", gtype)
if (gtype == "spice" and not
self.conn.check_support(
self.conn.SUPPORT_CONN_GRAPHICS_SPICE)):
(self.conn.caps.host.cpu.arch in ["i686", "x86_64"] and
self.conn.check_support(
self.conn.SUPPORT_CONN_GRAPHICS_SPICE))):
logging.debug("spice requested but HV doesn't support it. "
"Using vnc.")
gtype = "vnc"