Under construction.
Install needed packages
pkg infoCheck which packages are installed. Needed are:
vm-bhyve— Management system for bhyve virtual machinesbhyve-firmware— Collection of Firmware for bhyvekldstatKernel modules
vmm.ko— virtualzation driverzfs.ko— for the file systemsysrc vm_enable="YES"- enable
vm sysrc vm_dir="zfs:vmzfs/vm"- set root directory for the vm; after the reboot the templates will show up; alternatively
vm init vm init- set templates and config files in the
vm_dirdirectory vm switch create public- create the public bridge which is used by the virtual machine for the taptun virtual divices. the bridge is called
vm-publicbut in the config files of the virtual machines the name is onlypublic vm switch add public em0- add a physical intervace
em0that is used by the bridge to access he internet. Note that if you have multiple physical devices you have to add the device that has internet access. For exampleem1may be the device that has access to the internet in which case you have to change the above command accordingly. You can check that the bridge has the correct information by issuingifconfig vm-publicor justifconfigif the bridge name is notvm-publicand check undermembersto see which interfaces are in the bridge. The correctemXshould be listed vi /path/to/vm_dir/.config/system.conf- if there are two physical ethernet devices say
em0andem1theports_public="emX"lists which the interface the switch public is used. Note also in this file there isswitch_list="public"which is used in the config files in each virtual machine
Working with vm
This the the management system with which we will start, stop update and maintain the guests
vm start jupyter- start a virtual machine with name jupyter
vm list- list all virtual machine
vm info- Check information about running virtual machines (guests)
vm stop jupyter- stop gracefully the virtual machine with name jupyter
vm poweroff jupyter- stop forcefully the virtual machine with name jupyter
vm console jupyter- connect to the virtual machine console and log on
exit- It is a good idea to logoff the host before exiting the vm console
- Press
~(tilde) then^D(Ctrl+D) to terminate the console - you may need to press
Shiftto enter the tilde character; only the righthand shift works, pressing left shift with tilde simply supplies tilde to the guest (console) vm snapshot jupyter@snapshotname- create a snapshot of a virtual machine. It is (should be) stopped at the time of taking the snapshot
vm info jupyter- will give information about the virtual machine include the list of available snapshots of that machine