Fix "network 'default' is not active" when starting a VM
The problem and the main commands are right (virsh net-start default / net-autostart default, dnsmasq being required for the default NAT network, and the ufw route allow ... on virbr0 rules). The recreate path is wrong: /usr/share/libvirt/networks/default.xml does not exist in Arch's libvirt package. The shipped template is /etc/libvirt/qemu/networks/default.xml (verified against the package file list, which contains no /usr/share/libvirt/networks at all). Pasted as written, virsh net-define fails with 'failed to open file'.
Symptom
Starting a VM in virt-manager fails with:
Error starting domain: Requested operation is not valid: network 'default' is not active
It worked before I rebooted.
Cause
libvirt's default NAT network is not started, and/or not marked to autostart, so it goes away on every boot. It also silently fails to start if dnsmasq is not installed, since the default network depends on it for DHCP/DNS.
Fix
sudo pacman -S dnsmasq
sudo virsh net-list --all
sudo virsh net-start default
sudo virsh net-autostart default
If default is not listed at all, define it from the template Arch actually ships:
sudo virsh net-define /etc/libvirt/qemu/networks/default.xml
sudo virsh net-start default
sudo virsh net-autostart default
(The ufw rules for virbr0 and the verify steps are correct as written.)
Verify
sudo virsh net-list --all shows default active yes yes, ip a show virbr0 shows the bridge with 192.168.122.1, and the VM starts and gets an IP.