Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Mar 2019 10:58:55 -0700 (PDT)
From:      "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>
To:        Mark Raynsford <list+org.freebsd.virtualization@io7m.com>
Cc:        Shawn Webb <shawn.webb@hardenedbsd.org>, freebsd-virtualization@freebsd.org
Subject:   Re: bhyve: Detecting that a guest kernel has booted
Message-ID:  <201903111758.x2BHwttd010698@ gndrsh.dnsmgr.net>
In-Reply-To: <20190311172158.1c06b5d9@almond.int.arc7.info>

next in thread | previous in thread | raw e-mail | index | archive | help
-- Start of PGP signed section.
> On 2019-03-11T13:08:53 -0400
> Shawn Webb <shawn.webb@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).

Well ICMP is in the kernel, and should be working as soon as the
interface is up, long before you could do anything with NFS,
so rather than the complexity above a simple ping would suffice.

There is also the phase of vmm(8) startup that when you are
running bhyveload vs bhyve and iirc grubload vs bhyve, that
can be detected.  vmbhyve does so and says you are in state
looader when you do a vm list.

-- 
Rod Grimes                                                 rgrimes@freebsd.org



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