Re: any primer on running bhyve guests sharing disk with host ?

From: Neel Natu <neelnatu_at_gmail.com>
Date: Sat, 3 Jan 2015 11:00:13 -0800
Hi Luigi,

On Sat, Jan 3, 2015 at 8:15 AM, Luigi Rizzo <rizzo_at_iet.unipi.it> wrote:
> Hi,
> in order to do some kernel testing, I would like to run bhyve guests
> using (through NFS, probably) the host's file system.
> diskless(8) is probably one way to go, i was wondering if
> someone has instructions for that.
> Specifically:
> - how to "bhyveload" a kernel (rather than the full disk image);
>   as an alternative, given a kernel, something to build an image
>   that can be passed to bhyveload
>

You can use the "-h" option to bhyveload(8) to do this.

For e.g., "bhyveload -h / vmx" will load the kernel from
"/boot/kernel/kernel" and use the loader configuration from "/boot".

> - how to pass the necessary config (rootpath) to the client
>   without having to rely on a specialized dhcp server
>

You can set environment variables using the "-e" option:
bhyveload -e "boot.nfsroot.server=1.2.3.4" -e
"boot.nfsroot.path=/exports/guest1"

There are a number of other environment variables set by the PXE
loader - see sys/boot/i386/libi386/pxe.c. I haven't done this myself
therefore not sure if this would work.

best
Neel

> I used to be familiar with diskless configs, so i can probably sort
> out the server side myself.
>
>         cheers
>         luigi
Received on Sat Jan 03 2015 - 18:00:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:54 UTC