Setup libvirtd

Enable libvirtd service

[bash]: Run this on your workstation:
sudo systemctl enable --now libvirtd
sudo systemctl enable --now libvirt-guests
sudo systemctl status --no-pager libvirtd

Start the default network

[bash]: Run this on your workstation:
sudo virsh net-start default
sudo virsh net-autostart default

Configure /etc/group

Add the existing libvirt group to /etc/group, if it isn’t already:

[bash]: Run this on your workstation:
grep "^libvirt:" /etc/group || sudo bash -c "getent group libvirt >> /etc/group"

TODO Extra steps only needed for Debian workstations

Warning Debian install is a WIP

This doesn’t actually fully work on Debian 12 yet. Debian hosts apparently have an additional requirement to run qemu-bridge-helper (I didn’t need it on Fedora or Arch Linux). However, I couldn’t figure out how to get it to work on Debian 12, because I ran into strange app armor errors. YMMV.

Debian workstations only

On a Debian workstation, creating a config for qemu-bridge-helper was required, and modifying it to run setuid root to prevent user permission error (failed to create tun device: Operation not permitted: Transport endpoint is not connected):

[bash]: Run this on your workstation:
(set -e
sudo mkdir -p /etc/qemu
echo "allow virbr0" | sudo tee /etc/qemu/bridge.conf
sudo chmod u+s /usr/lib/qemu/qemu-bridge-helper
)

I also had to disable apparmor for libvirtd, otherwise I got permission errors:

[bash]: Run this on your workstation:
sudo truncate --size 0 /etc/apparmor.d/usr.sbin.libvirtd
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd