11

Whenever I start my laptop(HP) , 'Network Connections' shows it being connected (though it is actually not) . When I go to 'edit connections' option , it shows virbr0 . I have to delete it every time . How to get rid of this ? Is it a hardware problem ?

3
  • 2
    Are you running any VMs like VirtualBox or VMPlayer? If you are, virbr0 is created by those and should not be removed.
    – Terrance
    Nov 20, 2017 at 17:20
  • No . I'm not using any of them . @Terrance
    – Rangerix
    Nov 21, 2017 at 9:31
  • Sorry, I only listed 2 of them. There is a bigger list here of VMs. Any VM that is installed will create that for the virtual bridged network so the VM will get IP addresses.
    – Terrance
    Nov 21, 2017 at 14:44

2 Answers 2

12

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.

1
  • I added the same lines as the third solution to /etc/NetworkManager/NetworkManager.conf but it's still there. Will that take effect after restarting the system?
    – aderchox
    Aug 30, 2020 at 15:29
0

Give this a try this is mostly for Centos

sudo su -
virsh net-destroy default
virsh net-undefine default
systemctl stop libvirtd.service
systemctl disable libvirtd.service
apt remove qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils
1
  • 2
    Please read this about how to write a good answer, particularly the section "Provide context for links". Also: Did you successfully tried this on Ubuntu? Dec 29, 2018 at 3:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.