Virtual Networking in KVM breaking internet access

hypersonics asked:

I have set up a virtual networking on my CentOS 7 Workstation and the primary physical network interface is bridged as per this RHEL article.

libvirtd is running successfully, however after reboot this is what happens

virsh net-list --all
Name                 State      Autostart     Persistent
----------------------------------------------------------
default              inactive   yes           yes

If I try to start the default bridge. This is what I get

virsh net-start default 
error: Failed to start network default
error: internal error: Network is already in use by interface virbr0

So put the virtual bridge (virbr0) down and deleted the default bridge.

ifconfig virbr0 down
virsh net-start default 
Network default started

virsh net-list --all
Name                 State      Autostart     Persistent
----------------------------------------------------------
default              active     yes           yes

Once the virtual bridge (default) is active, I completely loose internet connectivity on my KVM host. Cannot ping www.google.com

Any idea why might be happening or any miss configuration that has occurred? I have the following interface scripts

Primary physical interface: ifcfg-enp1s0

TYPE="Ethernet"
NAME="enp1s0"
HWADDR=2c:27:d7:ef:fd:1e
UUID="f7fb856b-1879-411d-b8a4-0ef8c93303dc"
DEVICE="enp1s0"
ONBOOT="yes"
BOOTPROTO=dhcp
BRIDGE=virbr0
NM_CONTROLLED=no

Virtual Bridge interface: ifcfg-virbr0

DEVICE=virbr0
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=none
IPADDR=192.168.3.52
NETMASK=255.255.255.0
GATEWAY=192.168.3.1
STP=on
DELAY=0
NM_CONTROLLED=no

My answer:


Someone has created a manual configuration for the virbr0 virtual bridge interface, which is supposed to be managed by libvirt. The instructions you linked to state that it should instead be created for the br0 bridge interface.

You should change all occurrences of virbr0 in those ifcfg- files to br0. The name actually does not matter, but it must not be virbr0, which is the libvirt-managed interface.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.