virtinst: add --graphics gl option

Add a --graphics option to enable accelarated rendering using
OpenGl. This is used only by Spice (and for local only guests atm).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2016-03-04 12:31:51 +01:00 committed by Cole Robinson
parent 7c850c17b4
commit f912f28e97
7 changed files with 15 additions and 1 deletions

View File

@ -982,6 +982,11 @@ Request a VNC password, required at connection time. Beware, this info may
end up in virt-install log files, so don't use an important password. This
is used by 'vnc' and 'spice'
=item B<gl>
Whether to use OpenGl accelerated rendering. Value is 'yes' or 'no'. This is
used by 'spice'.
=back
Use --graphics=? to see a list of all available sub options. Complete details at L<http://libvirt.org/formatdomain.html#elementsGraphics>

View File

@ -210,6 +210,10 @@
<mouse mode="client"/>
<filetransfer enable="yes"/>
</graphics>
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
<gl enable="yes"/>
<image compression="off"/>
</graphics>
<serial type="tcp">
<source mode="bind" host="127.0.0.1" service="2222"/>
<protocol type="telnet"/>

View File

@ -476,6 +476,7 @@ c.add_compare(""" \
--graphics vnc,port=5950,listen=1.2.3.4,keymap=ja,password=foo \
--graphics spice,port=5950,tlsport=5950,listen=1.2.3.4,keymap=ja \
--graphics spice,image_compression=foo,streaming_mode=bar,clipboard_copypaste=yes,mouse_mode=client,filetransfer_enable=on \
--graphics spice,gl=yes \
\
--controller usb,model=ich9-ehci1,address=0:0:4.7,index=0 \
--controller usb,model=ich9-uhci1,address=0:0:4.0,index=0,master=0 \

View File

@ -39,6 +39,7 @@
<channel name="cursor" mode="any"/>
<channel name="playback" mode="insecure"/>
<channel name="display" mode="secure"/>
<gl enable="yes"/>
<image compression="auto_glz"/>
<streaming mode="filter"/>
<clipboard copypaste="yes"/>

View File

@ -649,6 +649,7 @@ class XMLParseTest(unittest.TestCase):
check("clipboard_copypaste", None, True)
check("mouse_mode", None, "client")
check("filetransfer_enable", None, False)
check("gl", None, True)
self._alter_compare(guest.get_xml_config(), outfile)

View File

@ -1892,6 +1892,7 @@ class ParserGraphics(VirtCLIParser):
self.set_param("mouse_mode", "mouse_mode")
self.set_param("filetransfer_enable", "filetransfer_enable",
is_onoff=True)
self.set_param("gl", "gl", is_onoff=True)
def _parse(self, opts, inst):
if opts.fullopts == "none":

View File

@ -108,7 +108,7 @@ class VirtualGraphics(VirtualDevice):
self._local_keymap = -1
_XML_PROP_ORDER = ["type", "port", "tlsPort", "autoport",
_XML_PROP_ORDER = ["type", "gl", "port", "tlsPort", "autoport",
"keymap", "listen",
"passwd", "display", "xauth"]
@ -224,5 +224,6 @@ class VirtualGraphics(VirtualDevice):
clipboard_copypaste = XMLProperty("./clipboard/@copypaste", is_yesno=True)
mouse_mode = XMLProperty("./mouse/@mode")
filetransfer_enable = XMLProperty("./filetransfer/@enable", is_yesno=True)
gl = XMLProperty("./gl/@enable", is_yesno=True)
VirtualGraphics.register_type()