Bug 1867343 - configuration of OpenGL is unintuitive
Summary: configuration of OpenGL is unintuitive
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-09 01:51 UTC by Be
Modified: 2020-09-02 03:44 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-09-02 00:22:37 UTC
Embargoed:


Attachments (Terms of Use)

Description Be 2020-08-09 01:51:19 UTC
Description of problem:
I am unable to configure a VM to use OpenGL. I do not understand why this needs to be configured in the first place; if it is possible, IMO it should be enabled by default. Otherwise applications in the guest OS mysteriously don't work or have terrible performance, sometimes without any helpful error message.

Version-Release number of selected component (if applicable):
virt-manager-2.2.1-3.fc32.noarch

How reproducible:
every time

Steps to Reproduce:
1. Create new VM
2. Set Video model to Virtio
3. Check OpenGL checkbox in Display Spice

Actual results:
1. Warning icon appears next to OpenGL checkbox in Display Spice configuration. Hovering the mouse shows:
"Graphics listen type does not support spice GL"

2. Trying to start the VM does not work and shows this error:
Error starting domain: internal error: process exited while connecting to monitor: 2020-08-09T01:39:24.147517Z qemu-system-x86_64: SPICE GL support is local-only for now and incompatible with -spice port/tls-port

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 111, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 66, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1279, in startup
    self._backend.create()
  File "/usr/lib64/python3.8/site-packages/libvirt.py", line 1234, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirt.libvirtError: internal error: process exited while connecting to monitor: 2020-08-09T01:39:24.147517Z qemu-system-x86_64: SPICE GL support is local-only for now and incompatible with -spice port/tls-port

Expected results:
Virtual machine starts and applications in the guest OS can use OpenGL.

Additional info:
I tried unchecking "Port" and "TLS port" in Display Spice, but that fails with this error:
Error changing VM configuration: unsupported configuration: spice TLS port set in XML configuration, but TLS is disabled in qemu.conf

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/addhardware.py", line 364, in change_config_helper
    define_func(devobj=devobj, do_hotplug=False, **define_args)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 715, in define_graphics
    self._redefine_xmlobj(xmlobj)
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 417, in _redefine_xmlobj
    self._redefine_xml_internal(origxml, newxml)
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 395, in _redefine_xml_internal
    self._define(newxml)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 999, in _define
    self.conn.define_domain(xml)
  File "/usr/share/virt-manager/virtManager/connection.py", line 612, in define_domain
    return self._backend.defineXML(xml)
  File "/usr/lib64/python3.8/site-packages/libvirt.py", line 4048, in defineXML
    if ret is None:raise libvirtError('virDomainDefineXML() failed', conn=self)
libvirt.libvirtError: unsupported configuration: spice TLS port set in XML configuration, but TLS is disabled in qemu.conf

I am using Intel UHD Graphics 620 integrated into an Intel Core i7 8550U.

Comment 1 Be 2020-08-09 03:38:34 UTC
After spending all day trying to get this to work, I now understand that SPICE can be used either over a local Unix socket or a network port and OpenGL is only supported over a local socket. After understanding that and looking back at the error messages, I realized I could change the "Listen type" option in "Display Spice" from "Address" to "None", then the warning icon next to the OpenGL checkbox went away and I could start the VM.

This is an awfully unintuitive user interface. Users shouldn't need to know those details; OpenGL should just work on local VMs. Users shouldn't even need to know what SPICE is. "Listen type" means nothing to me. As far as I can tell, this option determines whether SPICE accesses a local VM via a socket or a VM over a network. That's what it should say, "Network" or "Local socket" with the option labelled "VM location" -- not "Listen type".

Comment 2 Cole Robinson 2020-09-02 00:22:37 UTC
Thanks for the report. I understand this is confusing. I tried to improve the UI a bit upstream now. Rather than hide errors as tooltips on the icon, they are shown explicitly in the UI, and will mention the relevant UI fields directly.

We can not enable spice GL by default because it blocks critical end user features like snapshots and the 'Save' option, because at the qemu level GL support is not wired up for memory migration. It definitely affects VM stablity too because there's a much larger and less tested interaction surface between qemu and the VM and that can lead to more crashes.

Comment 3 Be 2020-09-02 03:44:03 UTC
Great, thanks for working on this. After playing around with it more, I realize OpenGL support isn't reliable enough yet to be enabled by default.

I tested commit a10d746 and the UI is clearer now. I still find the "Listen type" terminology strange though.


Note You need to log in before you can comment on or make changes to this bug.