How do I stop virbr0 interface being created?

On my machine virbr0 interface was created after installation of libvirt-bin package which is dependency of virt-manager.

Solution 1 (straight-forward):

It seems you can remove it from startup by removing corresponding file with

sudo rm /etc/libvirt/qemu/networks/autostart/default.xml

You can bring it back with

sudo ln -s /etc/libvirt/qemu/networks/default.xml /etc/libvirt/qemu/networks/autostart/default.xml

Solution 2 (with virsh)

  • disable: sudo virsh net-autostart --disable default
  • enable: sudo virsh net-autostart default

But this has side-effect. If you want to use bridged network in virt-manager you should start bridge before launching VM with sudo virsh net-start default.

Solution 3 (set virbr0 unmanaged in NetworkManager)

The following lines should be added to the end of /etc/NetworkManager/NetworkManager.conf:

[keyfile]
unmanaged-devices=interface-name:virbr0

The result: NetworkManager "does not know" about virbr0, but VMs can access bridged networking.