bhyve: Detecting that a guest kernel has booted

Shawn Webb shawn.webb at hardenedbsd.org
Mon Mar 11 17:28:05 UTC 2019


On Mon, Mar 11, 2019 at 05:21:58PM +0000, Mark Raynsford wrote:
> On 2019-03-11T13:08:53 -0400
> Shawn Webb <shawn.webb at hardenedbsd.org> wrote:
> >
> > If your guest OS supports it, you could probably write two scripts that
> > uses virtio_console(4), one for the guest to tell the host "HELLO" and
> > one for the host to say "NICE TO SEE YOU!" once the guest's "HELLO" is
> > received.
> > 
> 
> They're a mix of FreeBSD, OpenBSD, and Debian guests. So I'm guessing
> one out of three of those supports it...
> 
> I suppose my other option would be to add (another) NFS mount in each
> guest, and have them touch a file early in the init script (and
> possibly touch a different file early in the shutdown script).

Both FreeBSD and Linux supports virtio_console(4). I have no idea
about OpenBSD, but I'm sure they'd be open to an implementation if
asked.

The NFS solution would work, but it would be somewhat fragile. What
happens when a VM crashes? What happens when the host crashes?

Thanks,

-- 
Shawn Webb
Cofounder and Security Engineer
HardenedBSD

Tor-ified Signal:    +1 443-546-8752
Tor+XMPP+OTR:        lattera at is.a.hacker.sx
GPG Key ID:          0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-virtualization/attachments/20190311/2f28b0f5/attachment.sig>


More information about the freebsd-virtualization mailing list