Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Feb 2015 17:53:02 +0100
From:      Stefan Bethke <stb@lassitu.de>
To:        Craig Rodrigues <rodrigc@freebsd.org>
Cc:        "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org>
Subject:   Re: Booting a bhyve VM with NFS root?
Message-ID:  <D5AB5F0A-9678-453C-89FA-23797F45B42A@lassitu.de>
In-Reply-To: <CAG=rPVdeVRpK%2BN4P4Y4Qd%2BKfEPKQAdFgxGq=_O2dOFSGGwELEQ@mail.gmail.com>
References:  <CAG=rPVdeVRpK%2BN4P4Y4Qd%2BKfEPKQAdFgxGq=_O2dOFSGGwELEQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 06.11.2014 um 20:52 schrieb Craig Rodrigues <rodrigc@freebsd.org>:

> Hi,
>=20
> Has anyone tried the following:
>=20
>   (1)  Create a disk image, which only has the contents of the /boot
> directory
>         and /etc/fstab.
>   (2)  /etc/fstab should specify the root file system over NFS
>   (3)  Boot the disk image in bhyve.  The loader will parse =
/etc/fstab,
>         and it will also load the kernel and boot it.  When the kernel
> boots
>         it will mount the root file system over NFS.
>=20
> For a real system running with a BIOS, PXE can be used for a lot of =
this:
> https://www.freebsd.org/doc/handbook/network-diskless.html
>=20
> The pxeldr populates some kernel environment variables which are then
> used to mount a root file system:
>=20
> =
https://svnweb.freebsd.org/base/head/sys/nfs/nfs_diskless.c?revision=3D273=
174&view=3Dmarkup#l145
>=20
> Has anyone tried manually specifying these variables
> via the "bhyveload -e" arguments, and forcing the VM to mount its root =
file
> system over NFS?
>=20
> This would be handy for very quickly test booting a new buildworld.

Here's a quick hack to get the necessary variables in the appropriate =
format:

https://github.com/stblassitude/boot_root_nfs

I think the kernel should learn how to do the necessary mount RPC if the =
handle is not set, but I don't think I'm up to implementing that...


Stefan

--=20
Stefan Bethke <stb@lassitu.de>   Fon +49 151 14070811




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D5AB5F0A-9678-453C-89FA-23797F45B42A>