Msajor re-write of grub-bhyve support

Please see readme, all grub-bhyve guests (linux/openbsd/netbsd) will
need their configuration files changing. These changes are primarily to
allow users more control over the grub commands used, whilst removing a lot
of ugly redundant code from lib/vm-guest.
We now also support multiple guests with the stop command.
This commit is contained in:
Matt Churchyard
2016-04-05 10:29:47 +01:00
parent d162de6595
commit 44f8831ac9
16 changed files with 380 additions and 327 deletions

View File

@@ -15,10 +15,47 @@ Some of the main features include:
* Guest reboot handling
* Designed with multiple compute nodes + shared storage in mind (NFS/iSCSI/etc)
## IMPORTANT - Note for Linux/NetBSD & OpenBSD users moving from 0.9 to 0.10
The method of supporting these guests has been heavily changed in 0.10 to
allow more flexibility. These guests will no longer boot without making changes
to the configuration file. (Note the `vm configure guest` command can be used to open
the guest configuration in your default editor)
First of all, if you are using Linux, the guest configuration option needs to be changed to `linux`.
For NetBSD & OpenBSD, the following configuration options should be set.
guest="generic"
loader="grub"
Additionally, any grub commands needed to boot the guest (or the guest installer) need to also
be added to the configuration file. Please look at the sample templates in 0.10 for examples
on how these variables are set. This is what the configuration for OpenBSD 5.9 looks like:
grub_install0="kopenbsd -h com0 /5.9/amd64/bsd.rd"
grub_install1="boot"
grub_run_partition="openbsd1"
grub_run0="kopenbsd -h com0 -r sd0a /bsd"
grub_run1="boot"
The partition option is not required, the following is also functional:
grub_run0="kopenbsd -h com0 -r sd0a (hd0,openbsd1)/bsd"
grub_run1="boot"
(However some guests such as Ubuntu will boot automatically, without any boot commands specified,
if the correct partition is provided)
This of course means that it is now trivial to adjust these commands if needed, whereas in
previous versions of vm-bhyve, they were hard-coded.
If boot commands are specified, `grub-bhyve` is run in the background and commands are piped
in automatically by `vm-bhyve`. If no commands are specified, `grub-bhyve` is run on the guests
console, and so the bootloader can be accessed using `vm console guest` if required.
## Install
Download the latest release from Github, or download from the following URL
[http://churchers.hostingspace.co.uk/vm-bhyve-latest.tgz](http://churchers.hostingspace.co.uk/vm-bhyve-latest.tgz)
Download the latest release from Github, or install `sysutils/vm-bhyve`
To install, just run the following command inside the vm-bhyve source directory