Skip to content

Qemu support for the QXL driver and SPICE

Administrator requested to merge feature/qemu-qxl-driver into master

How to test

Requirements:

  • You need qemu installed in your host machine
  • You need a spice client installed in your host machine (supported: spicy and virt-viewer)
pmbootstrap config qemu-amd64
pmbootstrap -y install --no-fde
pmbootstrap qemu --spice
  • Is performance better or worse compared to pmbootstrap qemu (without --spice)?
  • Does the mouse pointer moves more smoothly?

Summary

Fixes https://github.com/postmarketOS/pmbootstrap/issues/453.

This is a step forward to get better graphics performance in QEMU.

Glossary:

  • QXL is a paravirtual graphics driver with 2D acceleration support
  • The SPICE project aims to provide a complete open source solution for remote access to virtual machines in a seamless way

This PR enables QXL driver support in the linux kernel configurations so that we can also use SPICE to connect to the VM if a client is available in the host machine. A new --no-spice argument is available to force not using the QXL driver. When using the QXL driver, qemu runs without showing any window and silently listens on port 8077/tcp waiting for a spice client to connect (similar to vnc).

Fun fact: I've seen that is somewhat common to use the port 5900 but this is already used by VNC and would cause a conflict if it is already running in the host machine. Instead, I chose 8077, which doesn't belong to any well-known service and represents 'PM'(bootstrap) in decimal.

At the moment, only spicy and remote-viewer spice clients are supported but adding support for more clients can be easily done.

For this purpose, I've also added support in pmbootstrap to run processes in background. This way we can run qemu in background and then run a spice client (in foreground) to connect to the virtual machine.

References:

Merge request reports

Loading