How to install Linux(Ubuntu Server 20.04) VM on FreeBSD 13.0 using bhyve and ZFS
1. Preparing the Host First, load the bhyve kernel module: # kldload vmm Then, create a tap interface for the network device in the virtual machine to attach to. In order to for the network device to participate in the network, also create a bridge interface containing the tap interface and the physical interface as members. In this example, the physical interface is em0: # ifconfig tap0 create # sysctl net.link.tap.up_on_open=1 net.link.tap.up_on_open: 0 -> 1 # ifconfig bridge0 create # ifconfig bridge0 addm em0 addm tap0 # ifconfig bridge0 up 2. Preparing for the Installation Download Ubuntu Server 20.04.3 LTS In order to boot Linux systems, grub2-bhyve must be first installed as follows: # pkg install grub2-bhyve 3. Creating a Linux Guest A ZFS volume can be created by: # zfs create -V16G -o volmode=dev zroot/linuxdisk0 Create a device.map that grub will use to map the virtual device to the files on the host system: (hd0) /dev/zvol/zroot/linuxdisk0 (...