Stop libvirt from clobbering your bridge configuration on reboot
By Saket Jain Published Linux/Unix
Stop libvirt from clobbering your bridge configuration on reboot
Technical Briefing | 10/15/2026
You spend all afternoon crafting the perfect bridge configuration for your KVM host. Everything is bridged, VLANs are tagged, and traffic is flowing exactly how you want. Then you reboot. You come back, and libvirt has either renamed your interfaces, stripped your stp settings, or outright deleted your manual bridge definition. This has bitten me more times than I care to admit.
Why libvirt thinks it owns your network
Libvirt is designed to manage its own virtual networks via the default net-autostart daemon. When you define a network XML, it tries to be helpful by ensuring the bridge exists at startup. If your host OS also has the bridge defined in /etc/network/interfaces or Netplan, you have a race condition where the two systems fight over who owns the bridge device. Most tutorials tell you to just use virsh net-define and call it a day, but that hides the actual kernel-level bridge parameters you likely need to tune for performance.
virsh net-autostart default --disable
networkctl reload
- Stop letting libvirt manage bridges that are already configured by your OS network stack.
- Disable the autostart flag on the default network if you are managing physical-to-virtual bridging via Netplan or systemd-networkd.
- Check your logs for bridge-related warnings immediately after a reboot before assuming the config stuck.
If you are running a production KVM host, you should define your bridges at the OS level using systemd-networkd or NetworkManager. Use libvirt only to attach to existing bridges. It is cleaner, less prone to mysterious churn, and saves you from the headache of debugging why your virtual interfaces suddenly lost their connectivity because a config sync failed to trigger properly.
Next time you are setting up a host, resist the temptation to just point and click in virt-manager. Hand-code your host bridges first, ensure they persist across reboots, and then tell libvirt to simply sit on top of them. You will sleep better knowing exactly who is in charge of your packet flow.
