mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-03-08 04:58:29 +03:00
guest: Set default rendernode= if spice gl requested
Since this is required to work out of the box with qemu:///system
This commit is contained in:
parent
bd1c6e55ad
commit
5ac933e98a
@ -235,12 +235,12 @@
|
||||
<filetransfer enable="yes"/>
|
||||
</graphics>
|
||||
<graphics type="spice">
|
||||
<gl enable="yes"/>
|
||||
<gl enable="yes" rendernode="/dev/dri/by-path/pci-0000:00:02.0-render"/>
|
||||
<image compression="off"/>
|
||||
<listen type="socket"/>
|
||||
</graphics>
|
||||
<graphics type="spice">
|
||||
<gl enable="yes"/>
|
||||
<gl enable="yes" rendernode="/dev/dri/by-path/pci-0000:00:02.0-render"/>
|
||||
<image compression="off"/>
|
||||
<listen type="none"/>
|
||||
</graphics>
|
||||
|
@ -44,7 +44,7 @@
|
||||
</interface>
|
||||
<input type="tablet" bus="usb"/>
|
||||
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
|
||||
<gl enable="yes"/>
|
||||
<gl enable="yes" rendernode="/dev/dri/by-path/pci-0000:00:02.0-render"/>
|
||||
<image compression="off"/>
|
||||
</graphics>
|
||||
<console type="pty"/>
|
||||
|
@ -1174,9 +1174,21 @@ class Guest(XMLBuilder):
|
||||
if dev.image_compression is None:
|
||||
dev.image_compression = "off"
|
||||
|
||||
if (dev.type == "spice" and dev.gl and
|
||||
not self.conn.check_support(self.conn.SUPPORT_CONN_SPICE_GL)):
|
||||
raise ValueError(_("Host does not support spice GL"))
|
||||
if dev.type == "spice" and dev.gl:
|
||||
if not self.conn.check_support(
|
||||
self.conn.SUPPORT_CONN_SPICE_GL):
|
||||
raise ValueError(_("Host does not support spice GL"))
|
||||
|
||||
# If spice GL but rendernode wasn't specified, hardcode
|
||||
# the first one
|
||||
if not dev.rendernode and self.conn.check_support(
|
||||
self.conn.SUPPORT_CONN_SPICE_RENDERNODE):
|
||||
for nodedev in self.conn.fetch_all_nodedevs():
|
||||
if (nodedev.device_type != 'drm' or
|
||||
nodedev.drm_type != 'render'):
|
||||
continue
|
||||
dev.rendernode = nodedev.get_devnode().path
|
||||
break
|
||||
|
||||
def _add_spice_channels(self):
|
||||
if self.skip_default_channel:
|
||||
|
Loading…
x
Reference in New Issue
Block a user