--------------------------------------------------------------------------------------------- freebsd virtualbox host --------------------------------------------------------------------------------------------- by o1 FreeBSD condo 13.1-RELEASE-p7 FreeBSD 13.1-RELEASE-p7 GENERIC amd64 --------------------------------------------------------------------------------------------- scenario --------------------------------------------------------------------------------------------- // host server is only accessible from the private network igb0: private network 192.168.52.201 igb1: public network up // guest virtual machines will use both network interfaces bridged vtnet0: private network vtnet1: public network --------------------------------------------------------------------------------------------- install virtualbox --------------------------------------------------------------------------------------------- zpool create -f -m /export -o autoexpand=off -O atime=On -O compression=lz4 tank raidz2 ada2 ada3 ada4 ada5 ada6 zfs create tank/vm pkg install virtualbox-ose vboxmanage setproperty machinefolder /export/vm vboxmanage list systemproperties pw groupmod vboxusers -m root --------------------------------------------------------------------------------------------- /etc/rc.conf --------------------------------------------------------------------------------------------- hostname="condo" ifconfig_igb0="inet 192.168.52.201 netmask 255.255.255.0" ifconfig_igb1="up" defaultrouter="192.168.52.1" # virtualbox headless vboxheadless_enable="YES" # virtualbox user vboxheadless_user="root" # virtualbox bridged networking vboxnet_enable="YES" --------------------------------------------------------------------------------------------- /etc/devfs.conf --------------------------------------------------------------------------------------------- own vboxnetctl root:vboxusers perm vboxnetctl 0660 --------------------------------------------------------------------------------------------- /boot/loader.conf --------------------------------------------------------------------------------------------- vboxdrv_load="YES" --------------------------------------------------------------------------------------------- if usb support is required --------------------------------------------------------------------------------------------- # add to group pw groupmod operator -m root # add to /etc/rc.conf devfs_system_ruleset="system" # add to /etc/devfs.rules [system=10] add path 'usb/*' mode 0660 group operator # restart without reboot /etc/rc.d/devfs restart --------------------------------------------------------------------------------------------- install guest virtual machines --------------------------------------------------------------------------------------------- https://www.genunix.com/o1/freebsd_virtualbox_freebsd_guest.txt --------------------------------------------------------------------------------------------- :0) ---------------------------------------------------------------------------------------------