rc-style script for bhyve VM provisioning and management
editor at callfortesting.org
Sun Nov 3 07:18:16 UTC 2013
Hello all from the FreeBSD 20th Anniversary Party in San Francisco,
I have published a bhyve virtual machine provisioning and management
framework to simplify the building and deploying of bhyve VMs during the
run-up to the FreeBSD 10.0 release. As you may know, bhyve is rapidly
finalizing for release in FreeBSD 10.0 and most features are finally
becoming stable enough to document in a canonical manner. These scripts
demonstrate the many opportunities for customization of bhyve
deployments and will embrace features like OpenBSD and Linux support as
soon as key components like the userland grub* arrive (currently in
final testing). It will also demonstrate the use of pf to allow bhyve
networking on wireless interfaces.
It can be downloaded from:
It works like a rc script but does not comply with the FreeBSD way. I am
working with several developers to determine to what degree it should be
compatible with existing frameworks like ezjail.
./vm0 will give the usage:
Some routines like "provision" include steps like fetch (distribution
sets), format (disk images or volumes) and install them.
The "jail" routine demonstrates how a virtual machine can be launched
using the jail(8) command, because we can, given that bhyve FreeBSD VMs
are simply instances of FreeBSD with the ABI limitations of different
releases. bhyve will support any vision of FreeBSD with VirtIO,
specifically FreeBSD 8.4 and 8-STABLE, 9.2 and 9-STABLE, and any recent
version of 10 or 11.
Detailed instructions are included in the vm0 script and it is designed
to simply be copied to vm1, vm2 etc. with easily-configured global
While tmux(1) is optional and supports both captive and detached
execution, a script is included to list and attach to running
VMs/sessions. A script is also provided for the easy duplication of VMs
and I have tested this with up to 15 X 16 vCPU instances though far more
should work without issue.
Please throw everything you can at bhyve to expose any remaining flaws
prior to the FreeBSD 10.0 release.
All the best,
More information about the freebsd-virtualization