Date: Thu, 6 Nov 2014 11:52:35 -0800 From: Craig Rodrigues <rodrigc@FreeBSD.org> To: "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org> Subject: Booting a bhyve VM with NFS root? Message-ID: <CAG=rPVdeVRpK%2BN4P4Y4Qd%2BKfEPKQAdFgxGq=_O2dOFSGGwELEQ@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi,
Has anyone tried the following:
(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.
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
The pxeldr populates some kernel environment variables which are then
used to mount a root file system:
https://svnweb.freebsd.org/base/head/sys/nfs/nfs_diskless.c?revision=273174&view=markup#l145
Has anyone tried manually specifying these variables
via the "bhyveload -e" arguments, and forcing the VM to mount its root file
system over NFS?
This would be handy for very quickly test booting a new buildworld.
--
Craig
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG=rPVdeVRpK%2BN4P4Y4Qd%2BKfEPKQAdFgxGq=_O2dOFSGGwELEQ>
