Update on running libvirt + virt-manager on Silverblue

Hi.

I was trying for some time to find a well working solution to my problem of running the libvirt and the virt-manager combo on Fedora Silverblue as I need Windows VMs for my job. I don’t mind of “getting hands dirty“, but eventually I was looking for a solution simple enough to set up and not to difficult to maintain when updating the OS. Ideally, I didn’t want to layer packages if possible.

I had following objectives:

  1. It is preferred to contain the solution in users space, as I use systemd-homed to manage my user.
  2. If 1st is not possible/too complex - have libvirt in system and virt-manager in user space.

Options I tried:

  1. Old good layering of both the libvirt and the virt-manager - it works but it was beyond my objectives.
  2. A compromise - the libvirt layered or added as a sysext and virt-manager installed as a flatpak application.
    Layering libvirt is working fine, but I left that as absolutely last resort, if nothing else could work. I tried the sysext route without success. I couldn’t get the libvirtd-desktop working even after multiple attempts and many hours reading and trying.
  3. Running libvirt and virt-manager in a distrobox container.distrobox wont work OOTB with systemd-homed managed user.

After all the options above have been tried, I decided to check, maybe the virt-manager is already packaged together with necessary libvirt, kvm and qemu bits and to my surprise I found this - the Virt Manager QEMU extension. With this extension I got the libvirt and virt-manager working in user space without messing with configs in the system space. I created QEMU/KVM User Session, imported my Windows 11 VM and it worked, except one thing - SPICE USB forwarding (I need to use my USB headphones in the VM). The solution to this last one isn’t optimal - I had to add a udev rule just for my specific headphones which creates a USB device file with permissions allowing the device to be accessed from the virt-manager flatpak app. But that is an acceptable compromise until better solution is available.

I wanted to share this so somebody having similar needs and issues could learn about a working alternative. I hope you find it useful.

Regards

ArtūrasB.

2 Likes