bhyve:installation
bhyve Installation
Installiere FreeBSD mit ZFS Dateisystem.
Um bhyve Kernelmodul beim Start zu laden, füge in /boot/loader.conf hinzu:
vmm_load="YES"
Um es direkt zu laden: kldload vmm
Für die VMs werden tap Netzwerkinterfaces verwendet, damit die automatisch aktiv werden, füge in /etc/sysctl.conf hinzu:
net.link.tap.up_on_open=1
Um es direkt zu setzen: sysctl net.link.tap.up_on_open=1
Installiere benötigte Software.
# pkg install vm-bhyve grub2-bhyve bhyve-firmware tmux sudo
Erstelle ZFS dataset für die VMs.
# zfs create zroot/vm
Füge in /etc/rc.conf hinzu:
ifconfig_igb0="up" vm_enable="YES" vm_dir="zfs:zroot/vm"
Initialiere vm-bhyve.
# vm init
Erstelle einen virtuellen Switch, der igb0 mit den Netzwerkinterfaces der VMs verbindet.
# vm switch create public # vm switch add public igb0 # vm switch list
Setze console auf tmux. Damit wird für jede VM eine eigene tmux Session gestartet.
# vm set console=tmux
Links
bhyve/installation.txt · Last modified: by msvoelker
