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

From: Luigi Rizzo <rizzo_at_iet.unipi.it>
Date: Sun, 4 Jan 2015 22:33:25 +0100
On Sat, Jan 03, 2015 at 11:00:13AM -0800, Neel Natu wrote:
> 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.

thank you, i have it up and running now.
For the records this is what I am using:

	sudo bhyveload -m 512 -h /tmp/diskless vm1

and in /tmp/diskless i have the following:
    boot/
	loader.rc:
		set hint.uart.0.at="isa"
		set hint.uart.0.port="0x3F8"
		set hint.uart.0.flags="0x10"
		set vfs.root.mountfrom=nfs:192.168.1.126:/
		boot /boot/kernel.diskless
	kernel.diskless

The 'set' commands in loader.rc are enough to have the serial
console detected and the root path.
They could be given through -e options to bhyveload so in the end
you only need to put a suitable kernel into /some/place/boot/kernel/kernel
and call bhyveload -h /some/place -e hint.uart.0.at=isa ...

Current issues which I am investigating:
- for some reason the guest sends packets with invalid UDP checksums
  over vtnet0, which can be solved by removing (in if_vtnet.c)
  TXCSUM from if_capenable.

- when using NFS root there seems to be no way to avoid the dhcp phase,
  which is unfortunate because it adds unnecessary delays to the boot.
  This can be probably fixed easily because there are already kenv
  variables (boot.netif.name and friends) for the purpose.

cheers
luigi
Received on Sun Jan 04 2015 - 20:28:41 UTC

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