vm-bhyve
vm-bhyve copied to clipboard
failed to add member bge0 to the virtual switch public
I just installed vm-bhyve 1.2.3 from pkg's on FreeBSD 12-current. When I try to add my public switch it fails with the error "Failed to add member bge0 to virtual switch public"
I also have iocage installed with several jails not sure if that setup is conflicting?
root@beastie:~ # ifconfig -a
bge0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=c019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE>
ether d4:be:d9:92:97:95
inet 192.168.1.10 netmask 0xffffff00 broadcast 192.168.1.255
inet 192.168.1.4 netmask 0xffffff00 broadcast 192.168.1.255
inet 192.168.1.7 netmask 0xffffff00 broadcast 192.168.1.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff000000
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 02:10:c0:ad:a5:00
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
member: bge0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 1 priority 128 path cost 55
groups: bridge
nd6 options=9<PERFORMNUD,IFDISABLED>
vm-public: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 36:11:44:61:20:c5
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
groups: bridge vm-switch viid-4c918@
nd6 options=1<PERFORMNUD>
Same issue here. I have it working on another machine and the major difference is I added my interface to a cloned interface:
cloned_interfaces="bridge0"
ifconfig_bridge0="addm bge0"
My guess is this is getting in the way for me. It seems you have a similar situation. Are you running non-vnet jails too? One option I have yet to pursue personally is adding it to one of my interfaces on my 4-port GBE card but I don't have a cable connected to it yet. Another thing, if you wanna try, is perhaps set all your jails to being vnet-enabled jails and see if that helps?
You may want to use vm-bhyve's 'manual' type of switch when you already have bridge configured by other means:
vm switch create -t manual -b bridge0 public
This is documented here so I don't see any issue here: https://github.com/churchers/vm-bhyve/wiki/Virtual-Switches#using-a-custom-bridge
I feel a bit dumb having glossed over that in the docs. But I also stopped trying virtualizing on my server because my CPU is too old to support guests that aren't the same OS as the host, thanks for pointing that out in the docs
Hmm, seems that error is right after a call to ifconfig vm-public addm {interface}
, so you could possibly get some further information by running that manually and seeing if it produced an error.
ifconfig: BRDGADD re0: Device busy
After removing re0 from a bridge, it works.