4

I wanna to use virtio-gpu according to this blog:

https://www.kraxel.org/blog/2016/09/using-virtio-gpu-with-libvirt-and-spice/

I am using Debian testing, but QEMU in offical debian source is not support OpenGL when I ran

qemu-system-x86_64 -display sdl,gl=on

it said

SDL1 display code has no opengl support.
Please recompile qemu with SDL2, using
./configure --enable-sdl --with-sdlabi=2.0
qemu-system-x86_64: OpenGL support is disabled

so I recompiled QEMU with these options.

After success, when I ran

qemu-system-x86_64 -display sdl,gl=on

again, it started a windows and continued.

But when I added

<graphics type='spice'>
  <listen type='none'/>
  <gl enable='yes'/>
</graphics>
<video>
  <model type='virtio'/>
</video>

to my libvirt domian file and started, libvirt prompt:

error: Failed to start domain debian9-xfce
error: unsupported configuration: This QEMU doesn't support spice OpenGL

I have already installed these package:

gir1.2-spice-client-gtk-3.0=0.33-3.3
libspice-server1=0.13.90-0.2
libvirglrenderer0=0.6.0-2
mesa-utils=8.3.0-5
libepoxy0=1.3.1-3

I spotted there is a libvirt patch for QEMU OpenGL support:

+    if (graphics->data.spice.gl) {
+        if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPICE_GL)) {
+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                           _("This QEMU doesn't support spice OpenGL"));
+            goto error;
+        }

But I don't know how does virQEMUCapsGet work to get QEMU capabilities because I have already compile QEMU with OpenGL support.

1
  • Wild guess: you installed your custom built qemu in /usr/local/bin and virtual machine manager is using the one in /usr/bin. I believe there's a way to edit the machine's XML to use a different qemu but I don't know the details.
    – doug65536
    Commented Oct 1, 2019 at 13:47

0

You must log in to answer this question.

Browse other questions tagged .