Libvirt (license LGPL, https://libvirt.org) is one of the best and most flexible virtual machine environments. A graphic frontend for libvirt is the tool Virt-Manager (license GPLv2, https://virt-manager.org). It is a solid tool to manage your virtual machines e.g. on a KVM/qemu server.
Interestingly there is a 3D driver in development called VirGL, some game seem to run already. VirGL will use the host GPU, so support need to be provided by the GPU driver as well. It is not a complete GPU pass-trough.
Based on https://wiki.archlinux.org/index.php/Libvirt you need to do the following base setup to get libvirt up and running on a host machine.
$ pacman -Sy libvirt qemu ovmf dnsmasq ebtables bridge-utils openbsd-netcat
As defined in /etc/libvirt/qemu.conf and /etc/libvirt/libvirtd.conf defaults to nobody, libvirt and kvm, replace USERNAME with your user.
$ gpasswd -a USERNAME libvirt $ gpasswd -a nobody kvm
Then uncomment or comment the following lines in libvirtd.conf like in the example below.
$ nano /etc/libvirt/libvirtd.conf unix_sock_group = "libvirt" unix_sock_ro_perms = "0770" unix_sock_rw_perms = "0770" auth_unix_ro = "none" auth_unix_rw = "none" #listen_tls = 0 #listen_tcp = 1 #auth_tcp=none
$ nano /etc/libvirt/qemu.conf nvram = [ "/usr/share/ovmf/x64/OVMF_CODE.fd:/usr/share/ovmf/x64/OVMF_VARS.fd" ]
$ nano /etc/conf.d/libvirtd LIBVIRTD_ARGS="" $ systemctl enable libvirtd.service $ systemctl start libvirtd.service
Then reboot or logout and login again.
Libvirt on Btrfs
Before creating a new virtual machine, make sure to disable the copy on write feature on a Btrfs file system so that it behaves like a traditional file system and directly modifies files without creating a copy first:
chattr +C -R /var/lib/libvirt/images
If files are created in that directory already, move them to first to another directory and then copy them again into this folder so that they get the +C added as well. you can see the actual attributes with this command:
Virt-Manager (https://virt-manager.org, GPLv3+) is a good tool to manage local and remote virtual machines on a Qemu/KVM on libvirt.
pacman -Sy virt-manager
If you have issues on KDE with ksshaskpass remembering passwords, run:
ln -s /usr/bin/ksshaskpass /usr/lib/ssh/ssh-askpass
Virt-Manager runs directly on Wayland and on Plasma-Wayland 5.12.
You can install Qt-Virt-Manager (https://github.com/F1ash/qt-virt-manager, GPLv2) from AUR. It runs natively on Wayland:
It works, but the qt5-remote–viewer doesn’t show any content, read the bug report https://github.com/F1ash/qt-virt-manager/issues/25.
So there is on Wayland currently no working solution at all.
Additionally to Virt-Manager you can use Cockpit to manage virtual machines, read Cockpit – Server Monitoring & Management.
Qemu 2.12 is finally deprecating GTK2 and SDL1 in favor of GTK3 and SDL2.
To use UEFI boot you must define it before creating the new virtual machine. Click on “Edit configuration before installation” and then select in the field firmware “”.
OVMP is the Tianocore open source UEFI firmware for qemu. It allows you to replace the grub with systemd-boot. At the boot you should see then the white Tianocore logo indicating UEFI support. As always, booting with UEFI is slower, the Tianocore needs 3 seconds for initialization, Linux needs less time to boot to a konole.