QEMU 6.1 will replace the virgl property of virtio-vga device to
virtio-vga-gl device. Adapt to that update.
Resolves:
https://gitlab.com/libvirt/libvirt/-/issues/167
Signed-off-by: Han Han <hhan(a)redhat.com>
---
src/qemu/qemu_command.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 6b9f13b219..56bc4b87eb 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4239,6 +4239,9 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
}
} else {
virBufferAsprintf(&buf, "%s", model);
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_VGA_GL) &&
+ STREQ(model, "virtio-vga"))
+ virBufferAddLit(&buf, "-gl");
}
virBufferAsprintf(&buf, ",id=%s", video->info.alias);
--
2.31.1