churchers / vm-bhyve

Shell based, minimal dependency bhyve manager
BSD 2-Clause "Simplified" License
825 stars 174 forks source link

rebooting a VM clears the link0 flag on its tap interface #558

Open llfw opened 1 day ago

llfw commented 1 day ago

interface while VM is running:

# ifconfig tap3
tap3: flags=1009843<UP,BROADCAST,RUNNING,SIMPLEX,LINK0,MULTICAST,LOWER_UP> metric 0 mtu 9000
        description: vmnet/iris/0/custom
        options=80000<LINKSTATE>
        ether 58:9c:fc:10:ff:8d
        inet6 fe80::1%tap3/64 scopeid 0x8
        groups: tap vm-port
        media: Ethernet 1000baseT <full-duplex>
        status: active
        nd6 options=1<PERFORMNUD>
        Opened by PID 76824

interface after VM reboots:

# ifconfig tap3
tap3: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 9000
        description: vmnet/iris/0/custom
        options=80000<LINKSTATE>
        ether 58:9c:fc:10:ff:8d
        inet6 fe80::1%tap3/64 scopeid 0x8
        groups: tap vm-port
        media: Ethernet 1000baseT <full-duplex>
        status: active
        nd6 options=1<PERFORMNUD>
        Opened by PID 51194

notice LINK0 is missing in flags.

VM config:

uuid="011cf85e-3551-4397-a6e7-fcd3141bd0d9"
loader="uefi"
cpu="1"
memory="1g"
wired_memory=yes
network0_type="virtio-net"
network0_device="tap3"
network0_mac="06:00:00:00:05:03"
disk0_type="nvme"
disk0_name="disk0.img,sectorsize=4096"
disk0_dev="file"
disk1_type="nvme"
disk1_name="disk1.img,sectorsize=4096"
disk1_dev="file"

vm-bhyve version 1.5.0_1 installed from ports

FreeBSD version FreeBSD 15.0-CURRENT #43 lf/main-n269060-ffd494371643: Tue Sep 17 05:59:59 BST 2024 srcmastr@daphne.eden.le-fay.org:/src/obj/src/freebsd/lf/main/amd64.amd64/sys/LF