Posts

Showing posts with the label bhyve

Install Debian(11.1.0) Linux VM on FreeBSD(13.0) with grub2-bhyve and ZFS without GUI

Image
Preparing the Host The first step to creating a virtual machine in bhyve is configuring the host system. 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 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   Creating a Debian Linux Guest with ZFS Using ZFS volumes instead of disk image files can provide significant performance benefits for the guest VMs. A ZFS volume can be created by:   # zfs create -V88G -o volmode=dev zroot/debiandisk0   List ZFS volume disk image files: % zfs list   Destroy A ZFS volume disk image file: #   zfs des...

Booting bhyve Debian/Ubuntu Linux VM with UEFI Firmware on FreeBSD

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 Using ZFS with bhyve Guests A ZFS volume can be created by: # zfs create -V88G -o volmode=dev zroot/linuxdisk0   If you want to destroy ZFS file. # zfs list   For example the ZFS file you want to destroy is  win10disk0: # zfs destroy  zroot/linuxdisk0 Preparing for the Installation Download Debian/Ubuntu Linux iso. Install VNC client # pkg install tightvnc   In order to make use of the UEFI support in bhyve, ...

BdsDex: failed to load Boot0001 "UEFI BHYVE SATA DISK BHYVE-OABE-20A5-E582" from PciRoot(0x0)/Pci (0x2, 0x0)/Stat(0x0,0xFFFF,0x0) : Not Found

Image
When you start Debian Linux after you installed Debian with UEFI bhyve on FreeBSD and rebooted FreeBSD, you will get the error message as follows: BdsDex: failed to load Boot0001 "UEFI BHYVE SATA DISK BHYVE-OABE-20A5-E582" from PciRoot(0x0)/Pci (0x2, 0x0)/Stat(0x0,0xFFFF,0x0) : Not Found   Description It will try other way to start system, but it will failed finally. At the last, it will come to UEFI  Shell . How to access the Debian Guest VM? 1. Enter exit get out of the UEFI Shell (you will come to BHYVE panel) 2. Choose Boot Maintenance Manager 3. (In the Boot Maintenace Manager ) Choose Boot From File 4. (In File Explorer) NO VOLUME LABEL, [PciRoot(0x0)/ Pci()]  press Enter 5. (Still in the File Explorer) Choose <EFI> 6. (Still in the File Explorer) Choose debian   7. (Still in the File Explorer) Choose grubx64.efi 8. Then you will get into the system How can you fix it: 1) Get access inside your Debian Guest VM. 2) as root: cd /boot/efi/ 3) mkdir -p...

How to install Linux(Ubuntu Server 20.04) VM on FreeBSD 13.0 using bhyve and ZFS

Image
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 (...

How to install Windows10 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. Using ZFS with bhyve Guests A ZFS volume can be created by: # zfs create -V88G -o volmode=dev zroot/win10disk0   If you want to destroy ZFS file. # zfs list   For example the ZFS file you want to destroy is  win10disk0: # zfs destroy  zroot/win10disk0 3. Preparing for the Installation Download an installation image of  Windows10 to install: https://www.microsoft.com/en-us/software-download/windows10ISO Instal...

How to install FreeBSD VM on FreeBSD 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 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. Using ZFS with bhyve Guests If ZFS is available on the host machine, using ZFS volumes instead of disk  image file can provide significant performance benefits for the guest VMs.  A ZFS volume can be created by: # zfs create -V16G -o volmode=dev zroot/freebsddisk0 Download an installation image of FreeBSD to install:  https://download.freebsd.org/ftp/releases/ISO-IMAGES/13.0/ or ...