-----BEGIN PGP SIGNED MESSAGE-----
On Wed, 31 Dec 2014 00:16:23 -0800
Peter Grehan <gre...@freebsd.org> wrote:
> Hi William,
> > An inspection of ps shows that it is at the grub-bhyve command. I
> > daresay it is waiting for the stdin lines:
> > kopenbsd -h com0 (hd0,openbsd1)/bsd
> > boot
> > The "automatic" boot seems not to work.
> > Is there a way to "automate" the input of these lines into
> > grub-bhyve from libvirt so that my virsh start command works? Or
> > will I need to run this with grub-bhyve / bhyve commands for now?
> > Is this a feature that should be added to grub-bhyve to accept a
> > parameter that is a boot script perhaps? Or libvirt to have a
> > function to direct into stdin of the grub-bhyve prompt.
> This can be done with grub-bhyve's command-line options. The
> default device is "(host)", so you can have a grub.cfg file on the
> host with the path specified with the '-d' option e.g. if you have a
> grub.cfg in /usr/bhyve, you would start grub with
> grub-bhyve -d /usr/bhyve <keep remaining options>
> No need to specify a '-r' param since it defaults to host.
> You can use the existing kopenbsd line in your grub.cfg since you
> are manually specifying the complete device spec and path.
Thanks. The grub-bhyve --help flag isn't 100% clear about it's
capabilites, and there seems to be a lack of a man page. But your tips
got me in the correct direction. Here is the solution.
However, I have now gotten this work work with libvirt also.
First, the command was to make:
- --root host --directory /var/lib/libvirt/boot/openbsd
- --device-map /var/run/libvirt/bhyve/grub_bhyve-guest-device.map
- --memory 512 guest
Inside of the directory on the bhyve host /var/lib/libvirt/boot/openbsd
a file called grub.cfg contains
kopenbsd -h com0 -r sd0a (hd0,msdos4)/bsd
The key thing here is that grub-bhyve has a device called (host) that
allows inclusion of files from the host.
Following this working, this command line string is added to virsh's
xml definition under <boolloader_args>
You cannot just add the extra arguments "--root" and "--directory" to
bootload_args as it is a complete replacement of the automatically
generated arguments that libvirt creates. I however, still rely on the
autogenerated device map file that it creates (Note it's in /var/run)
Perhaps this is a deficiency that should be addressed in the bootloader
compontent of libvirt to make this process a bit easier?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-----END PGP SIGNATURE-----
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to