Page 1 of 1

[SOLVED] Issues with starting default network due to being in use by bridge

Posted: 2022/09/22 00:24:53
by subzerotitan
Hello All,

I'm still getting my feet wet with CentOS 7 and for the most part it's been pretty straightforward. I'm running into an issue with configuring my default network (or bridge) correctly in order to begin creating guest VM's on this linux host. My physical server has 4 onboard cards that are all connected to my network switch. The 4 ethernet interfaces are bonded into

Code: Select all

bond0
which is a slave to the bridge

Code: Select all

br0
. I've attached a drawing of the server topology so it makes more sense in the event I didn't do well in explaining.

I have already created a VM and was able to get an IP from my network while the network interface was assigned to 'specify connection' and I entered 'br0' for my bridge. But obviously in this case I would want my VM network interface to be set to the 'default' NAT network. After making this change, I cannot start up the VM and it errors out with:

Code: Select all

error: Failed to start domain VM_NAME
error: Requested operation is not valid: network 'default' is not active
I am SSH'ing into this machine by connecting to the bridge

Code: Select all

br0
interface as well. I've read countless RH documentation pages as well as other forum pages but can't figure this part out. I did find a website that mentioned deleting the bridge and then starting the network, but then I'd still have to create the bridge all over again which would cause the same issue.

Am I configuring this incorrectly? I was wondering if maybe I should have been reserving one of the physical interfaces to assign a separate IP on the same subnet. Any help is much appreciated!

Re: Issues with starting default network due to being in use by bridge

Posted: 2022/09/22 09:29:28
by TrevorH
The 'default' network is already set up by libvirt and uses virbr0 and has a DHCP server on it serving ip addresses from 192.168.122.0/24. You probably want to use --network=bridge:br0

Re: Issues with starting default network due to being in use by bridge

Posted: 2022/09/22 10:14:39
by subzerotitan
Hi Trevor,

Are you referring to using —network=bridge:br0 in the creation of the VM? Also, the default network was modified by me with the attributes that are seen in my attachment. Should I change it back to the defaults?

I believe I’m just confused on how I’m supposed to create and manage existing VM’s to obtain an IP on my existing LAN subnet (192.168.19.0/24) when I can’t use the ‘default’ network to accomplish this.

Re: Issues with starting default network due to being in use by bridge

Posted: 2022/09/22 10:30:42
by TrevorH
Yes, don't use the default network, set up your own bridge and use that. Disable the default network virsh net-autostart default --disable

Re: Issues with starting default network due to being in use by bridge

Posted: 2022/09/22 11:33:02
by jlehtone
If you have a managed network switch, then it has IP address that you can connect to in order to manage it. Unmanaged switch does not have IP address.

A bridge is a network switch. You have created (correctly) the br0 that is connected to other (physical) switch with bonded links.
Your host server has its IP address (192.168.19.108) on the bridge and is thus member in subnet "LAN" (192.168.19.0/24).


If you do let libvirt to start the subnet "default", then the host is a member on that separate subnet (default 192.168.122.0/24) too.
If you attach VM to "default", the host acts as router between "LAN" and "default".
(Does NAT too, so members of LAN believe that there is only 192.168.19.108.)

You can't have 192.168.19.0/24 on both subnets -- you can't be 192.168.19.108 on more than one subnet; they must be different.


Yes, you can attach VM to br0, just like you would plug physical machine to physical network switch. You can do it when you create VM, or you can modify existing VM; network devices are usually "hotpluggable", so one can add/remove them while VM is running.

When VM has network interface on br0, it is in the "LAN".

While I prefer CLI (so mostly virsh for libvirt) I do also like virt-manager that is Python-based GUI for creating&managing VMs (of multiple hosts via ssh).

Re: Issues with starting default network due to being in use by bridge

Posted: 2022/09/22 13:04:48
by subzerotitan
Thanks TrevorH and jlehtone, I'll disable 'default' network and give this another shot. That makes much more sense, I was curious why some guides instruct to configure the default network IP as the bridge IP.

Re: Issues with starting default network due to being in use by bridge

Posted: 2022/09/22 14:41:10
by subzerotitan
Interesting, so disabling the default network and enabling DHCP on my network gateway resolved the issue with the guest VM's not being able to connect to my local LAN. I see the DHCP reservation on my gateway, but the guest VM (Windows Server) is displaying 'Unidentified Network' so I can't sign into it.

Going to keep digging as I can't ping the guest VM from any other network device either, so it seems like it's something on the host itself.

Re: Issues with starting default network due to being in use by bridge

Posted: 2022/09/22 20:46:36
by jlehtone
When host routes between subnets, the traffic goes through netfilter. Therefore, firewall must allow the traffic.

However, when traffic is bridged, it is not filtered by the host at all; no firewall.
(There is a way to explicitly enable the filtering for bridged traffic, but you would know if you had done that.)


What do you mean by "sign into it"?

Re: Issues with starting default network due to being in use by bridge

Posted: 2022/09/22 21:31:25
by subzerotitan
Thanks for the clarification on when traffic is filtered! I was referring to signing into one of the guest VM's that had already been domain joined prior to making changes to the networking layout of this host.

All is working now as intended, I appreciate your help very much!