You are not logged in.

#1 2022-02-22 12:04:03

rtorrero
Member
Registered: 2015-10-22
Posts: 12

Libvirt domains don't get attached to the relevant bridge when started

I'm trying to get in multiple ways for my libvirt domains to get attached to any bridge without any luck. I've tried both manually creating the bridge with NetworkManager as well as letting libvirt use the `default` network that creates a

virbr0

device and then attaches the

vnet0

device from the VM to it. Shortly after starting the domain, I can see:

[   79.946229] virbr0: port 1(vnet0) entered blocking state
[   79.946233] virbr0: port 1(vnet0) entered disabled state
[   79.946286] device vnet0 entered promiscuous mode
[   79.946517] virbr0: port 1(vnet0) entered blocking state
[   79.946520] virbr0: port 1(vnet0) entered listening state
[   79.976966] device vnet0 left promiscuous mode
[   79.976979] virbr0: port 1(vnet0) entered disabled state

if I check the bridge status with `brctl` I see `vnet0` is not attached to the bridge:

bridge name	bridge id		STP enabled	interfaces
virbr0		8000.525400d5f248	yes	

As I said, I've tried:
- Manually created bridge
- Bridge created by libvirt
- Bridge with STP enabled / disabled
- Enabling / Disabling firewalld


If I just manually:

galileo# brctl addif virbr0 vnet0
galileo# brctl show
bridge name	bridge id		STP enabled	interfaces
virbr0		8000.525400d5f248	yes		vnet0

Then the VM is immediately able to send a DHCP request on the bridge and get it's network up.

I suspect there is a race condition somewhere, where the `vnet0` device is up too quickly and attempts to get attached to the bridge before it's ready or something similar. It's pretty annoying to have to manually attach the VMs as I'm very often adding and removing VMs to my libvirt host.

What the heck is going on :-)?

Thanks!

Last edited by rtorrero (2022-02-22 12:09:30)

Offline

#2 2022-02-23 11:21:28

rtorrero
Member
Registered: 2015-10-22
Posts: 12

Re: Libvirt domains don't get attached to the relevant bridge when started

I gave up and went for a clean install, but the issue is still present. It's not on my other workstation with also an up-to-day arch install so I'm assuming it's a bug.

Offline

Board footer

Powered by FluxBB