On 12/7/2024 4:37 PM, Thomas Laus wrote:
I used FreeBSD-update to go from 14.1-RELEASE to 14.2-RELEASE and there is an issue with creating and using the tap device.  The device doesn't get created during the boot process and can't be created or used after the system is up.  The UPDATING file has just one entry concerning the tap device and that is change the 'tap' name in all configuration files with 'tuntap'. I did that and get an invalid device reply.  I installed the latest package for vm-bhyve which did not make any difference.  I also deleted /usr/obj/* and checked out a fresh /usr/src and rebuilt FreeBSD-14.2-RELEASE from source without anything working differently.

If anyone has a working tap device using FreeBSD 14.2-RELEASE, I would appreciate you sharing your bhyve portions of /etc/rc.conf, /etc/sysctl.conf and /boot/loader.conf files.

I dont have anything unusual in my config. I am running just a few days ahead of 14.2, but I dont think that makes a difference


 kldstat
Id Refs Address                Size Name
 1   47 0xffffffff80200000  1f3d9c0 kernel
 2    1 0xffffffff8213f000   5da658 zfs.ko
 3    1 0xffffffff8271a000     36c8 coretemp.ko
 4    2 0xffffffff8271e000    8dae8 pf.ko
 5    1 0xffffffff827ac000     77d8 cryptodev.ko
 6    1 0xffffffff827b4000     3c58 pflog.ko
 7    1 0xffffffff83c20000     3390 acpi_wmi.ko
 8    1 0xffffffff83c24000     4250 ichsmb.ko
 9    1 0xffffffff83c29000     2178 smbus.ko
10    1 0xffffffff83c2c000     7798 if_bridge.ko
11    1 0xffffffff83c34000     60e0 bridgestp.ko
12    1 0xffffffff83c3b000     33c0 uchcom.ko
13    1 0xffffffff83c3f000     4e10 ucom.ko
14    1 0xffffffff83e00000   33e438 vmm.ko
15    1 0xffffffff83c44000     4850 nullfs.ko


Starting up a vm works as before for me

 vmrun.sh -t tap0 -d /baseimage/14-1VM-p6.raw -E  vm0
Launching virtual machine "vm0" ...
fbuf frame buffer base: 0x2be256a00000 [sz 16777216]
3h
3h
3h
BdsDxe: loading Boot0001 "UEFI Misc Device" from PciRoot(0x0)/Pci(0x3,0x0)
BdsDxe: starting Boot0001 "UEFI Misc Device" from PciRoot(0x0)/Pci(0x3,0x0)
Consoles: EFI console
    Reading loader env vars from /efi/freebsd/loader.env
Setting currdev to disk0p2:
FreeBSD/amd64 EFI loader, Revision 1.1

   Command line arguments: loader.efi
   Image base: 0x1e27a000
   EFI version: 2.70
   EFI Firmware: BHYVE (rev 1.00)
   Console: efi (0x20001000)
   Load Path: \EFI\BOOT\BOOTX64.EFI
   Load Device: PciRoot(0x0)/Pci(0x3,0x0)/HD(2,GPT,E140336F-1F4D-11EF-AE18-002590EC5BF2,0x17B,0x10418)
   BootCurrent: 0001
   BootOrder: 0000 0001[*] 0002 0003 0004
   BootInfo Path: PciRoot(0x0)/Pci(0x3,0x0)
Ignoring Boot0001: Only one DP found
Trying ESP: PciRoot(0x0)/Pci(0x3,0x0)/HD(2,GPT,E140336F-1F4D-11EF-AE18-002590EC5BF2,0x17B,0x10418)
Setting currdev to disk0p2:
Trying: PciRoot(0x0)/Pci(0x3,0x0)/HD(1,GPT,E1403365-1F4D-11EF-AE18-002590EC5BF2,0x22,0x159)
Setting currdev to disk0p1:
Trying: PciRoot(0x0)/Pci(0x3,0x0)/HD(3,GPT,E1403374-1F4D-11EF-AE18-002590EC5BF2,0x10593,0x200000)
Setting currdev to disk0p3:
Trying: PciRoot(0x0)/Pci(0x3,0x0)/HD(4,GPT,E1403378-1F4D-11EF-AE18-002590EC5BF2,0x210593,0x11FFF6D)
Setting currdev to zfs:zroot/ROOT/default:
-
Loading /boot/defaults/loader.conf
Loading /boot/defaults/loader.conf
Loading /boot/device.hints
Loading /boot/loader.conf
Loading /boot/loader.conf.local
?c\
|  ______               ____   _____ _____
  |  ____|             |  _ \ / ____|  __ \
  | |___ _ __ ___  ___ | |_) | (___ | |  | |
  |  ___| '__/ _ \/ _ \|  _ < \___ \| |  | |
  | |   | | |  __/  __/| |_) |____) | |__| |

  | |   | | |    |    ||     |      |      |


.

.

.

root@freebsd:~ # ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=114 time=28.173 ms
^C
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 28.173/28.173/28.173/0.000 ms
root@freebsd:~ # shutdown -p now
Shutdown NOW!

...


The bridge to tap0 works as expected. It gets auto created for me

I can create new ones too

# ifconfig tap1 create


# ifconfig tap1
tap1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=4080000<LINKSTATE,MEXTPG>
        ether 58:9c:fc:10:63:02
        groups: tap
        media: Ethernet 1000baseT <full-duplex>
        status: no carrier
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>


On an actually 14.2R box, if I add to rc.conf

cloned_interfaces="bridge0 tap0"

it gets created at boot

% ifconfig tap0
tap0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80000<LINKSTATE>
        ether 58:9c:fc:10:ff:ed
        groups: tap
        media: Ethernet 1000baseT <full-duplex>
        status: no carrier
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>



Reply via email to