Solved Lost IP, vm-bhyve Windows 11

Here is what happened.
My win11 over vm-bhyve worked just fine. Today I mistakenly renamed/vm/.iso/virtio-win-0.1.271.iso which is called out by/vm/win11/win11.conf. Then I realized I couldn't start the vm win11. So I changed back to the original name virtio-win-0.1.271.iso. After that, I can start vm win11, I can access it via tigervnc (0.0.0.0:5910), but I can't rdp to it because there is no valid IP address. My hunch says there must be a simple tweak can do the trick to bring the network back.
Some more info,
re1: flags=1008943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=82099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
ether 2c:f0:5d:59:8d:d3
inet 192.168.1.160 netmask 0xffffff00 broadcast 192.168.1.255
inet 192.168.1.165 netmask 0xffffffff broadcast 192.168.1.165
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
re1bridge: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=0
ether 58:9c:fc:10:ff:8c
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: tap1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 6 priority 128 path cost 2000000
member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 5 priority 128 path cost 2000000
member: re1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 2 priority 128 path cost 55
groups: bridge vm-switch viid-cc582@
nd6 options=9<PERFORMNUD,IFDISABLED>
tap0: flags=8902<BROADCAST,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
ether 58:9c:fc:10:ff:dd
groups: tap
media: Ethernet 1000baseT <full-duplex>
status: no carrier
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
tap1: flags=1008943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
description: vmnet/win11/0/customswitch
options=80000<LINKSTATE>
ether 58:9c:fc:10:13:03
groups: tap vm-port
media: Ethernet 1000baseT <full-duplex>
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Opened by PID 47065


% sudo vm switch info
------------------------
Virtual Switch: customswitch
------------------------
type: manual
ident: re1bridge
vlan: -
physical-ports: -
bytes-in: 6234192 (5.945M)
bytes-out: 342500004 (326.633M)

virtual-port
device: tap1
vm: win11

virtual-port
device: tap0
vm: -
 
Maybe a false alarm. Now the vm has connection. What I did was manually assign IP, gateway and DNS. These settings used to be DHCP. Don't know what makes the difference.
 
Back
Top