So here are my FreeBSD notes, from docs.freebsd.org when using Bhyve
1. Add to /boot/loader.conf or load the vmm Kernel Driver to test it on the way with kldload vmm as root or using doas.
2. Create Network card using ifconfig tap0 create and add it to the /etc/sysctl.conf the next line net.link.tap.up_on_open=1 or execute the command with a sysctl prefix without adding the value to the sysctl.conf file in the shell.
3. Create Bridge Network Interface using ifconfig bridge0 create and add all used networks in the same group using ifconfig bridge addm re0 addm tap0. The re0 interface name is our physical Network Card name, and type ifconfig bridge0 up to make the bridge0 network interface available.
4. Based on the last article, we create the virtual disk blocks using truncate -s 10G virtualdiskExample.img, assuming we are in some directory like /usr/jails/vExample
4. Then we download using fetch as the example: fetch https://download.freebsd.org/releases/ISO-IMAGES/15.0/FreeBSD-15.0-RELEASE-amd64-bootonly.iso
5. Run Bhyve Script to see more options by adding -h sufix and boot our new FreeBSD vm by typing:
sh /usr/share/examples/bhyve/vmrun.sh -c 1 -m 1024M -t tap0 -d guest.img -i -I FreeBSD-15.0-RELEASE-amd64-bootonly.iso virtualdiskExample.img
With Linux iamges we use: bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 -s 3:0,virtio-blk,./linux.img -s 4:0,ahci-cd,./somelinux.iso -l com1,stdio -c 4 -m 1024M linuxguest
It is necessary to destroy it before starting again: bhyvectl --destroy --vm=linuxguest
Boot it using:bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 -s 3:0,virtio-blk,./linux.img -l com1,stdio -c 4 -m 1024M linuxguest