Qemu support for the QXL driver and SPICE (#481)

* pmb.helpers.run: support running processes in background
* enable QXL driver support in the linux kernel configurations so
that we can also use SPICE to connect to the VM.

QXL is a paravirtual graphics driver with 2D support

The SPICE project aims to provide a complete open source solution for remote
access to virtual machines in a seamless way.

Both DRM_QXL and DRM_BOCHS are enabled as modules.
According to [1], on Linux guests, the qxl and bochs_drm kernel modules
must be loaded in order to gain a decent performance

* qemu: add new option --spice to connect to VM using a SPICE client

If specified, 'pmbootstrap qemu' will look for some SPICE client in the
user's PATH and run qemu using the QXL driver.

Currently supported spice clients are 'spicy' and 'remote-viewer' but
adding support for more clients can be easily done.

qemu with qxl support will run on port 8077/tcp, which doesn't belong to
any well-known service and represents 'PM' in decimal.

References:
[0] https://www.linux-kvm.org/page/SPICE
[1] https://wiki.archlinux.org/index.php/QEMU#qxl
[2] https://wiki.archlinux.org/index.php/QEMU#SPICE
[3] https://github.com/postmarketOS/pmbootstrap/issues/453 (partially fixed)
This commit is contained in:
Pablo Castellano 2017-09-26 22:52:00 +02:00 committed by Oliver Smith
parent d48ca092b4
commit c855ee095b
13 changed files with 137 additions and 49 deletions

View file

@ -294,6 +294,11 @@ def arguments():
help="guest RAM (default: 1024)")
qemu.add_argument("-p", "--port", type=int, default=2222,
help="ssh port (default: 2222)")
qemu.add_argument("--spice", dest="use_spice",
default=False, action="store_true",
help="connect to the VM using SPICE (NOTE: you need to"
" have a SPICE client installed in your host"
" machine)")
# Use defaults from the user's config file
args = parser.parse_args()