Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Jan 2015 22:33:25 +0100
From:      Luigi Rizzo <rizzo@iet.unipi.it>
To:        Neel Natu <neelnatu@gmail.com>
Cc:        FreeBSD current <freebsd-current@freebsd.org>, Neel Natu <neel@freebsd.org>, Peter Grehan <grehan@freebsd.org>
Subject:   Re: any primer on running bhyve guests sharing disk with host ?
Message-ID:  <20150104213325.GB22198@onelab2.iet.unipi.it>
In-Reply-To: <CAFgRE9HznDcSUaVK3miJFzKgnYLJcRJ4=A4jBzU=M87NRW%2BkuA@mail.gmail.com>
References:  <20150103161511.GA94237@onelab2.iet.unipi.it> <CAFgRE9HznDcSUaVK3miJFzKgnYLJcRJ4=A4jBzU=M87NRW%2BkuA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150104213325.GB22198>