From owner-freebsd-virtualization@freebsd.org Mon Mar 11 17:46:48 2019 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D27521527CAB for ; Mon, 11 Mar 2019 17:46:47 +0000 (UTC) (envelope-from list+org.freebsd.virtualization@io7m.com) Received: from mail.io7m.com (mail.io7m.com [IPv6:2001:19f0:5:752:f000::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.io7m.com", Issuer "arc7 CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5D08F72274 for ; Mon, 11 Mar 2019 17:46:47 +0000 (UTC) (envelope-from list+org.freebsd.virtualization@io7m.com) Received: from almond.int.arc7.info (cust187-dsl61.idnet.net [212.69.61.187]) by mail.io7m.com (Postfix) with ESMTPSA id 2A7AA2F2D7; Mon, 11 Mar 2019 17:46:45 +0000 (UTC) Date: Mon, 11 Mar 2019 17:46:35 +0000 From: Mark Raynsford To: Shawn Webb Cc: freebsd-virtualization@freebsd.org Subject: Re: bhyve: Detecting that a guest kernel has booted Message-ID: <20190311174635.63a071e2@almond.int.arc7.info> In-Reply-To: <20190311172723.idvwvphb4acarxvi@mutt-hbsd> References: <20190311170420.61bd34c6@almond.int.arc7.info> <20190311170853.cwjclznvsyd2wksu@mutt-hbsd> <20190311172158.1c06b5d9@almond.int.arc7.info> <20190311172723.idvwvphb4acarxvi@mutt-hbsd> Organization: io7m.com OpenPGP: id=E379595716131DB4E7AB87DD67B18CC1F9ACE345; url=http://io7m.com/pgp/E379_5957_1613_1DB4_E7AB_87DD_67B1_8CC1_F9AC_E345.key MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/T2w0M3ABGWkJVOl+1e70YTY"; protocol="application/pgp-signature" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 17:46:48 -0000 --Sig_/T2w0M3ABGWkJVOl+1e70YTY Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On 2019-03-11T13:27:23 -0400 Shawn Webb wrote: > > 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. Right. >=20 > The NFS solution would work, but it would be somewhat fragile. What > happens when a VM crashes? What happens when the host crashes? At least in my case: If the VM crashes, it'll be restarted by a process supervisor (runit, here). If the host crashes, I likely have bigger problems. In any case, I think that's still fine because all the host would care about is if the guest's file was touched more recently than the last time the host tried to start a bhyve process for it. I suppose I should elaborate a bit: I do have monitoring via Prometheus in place, but I'd like to try to stagger VM startups a little as starting up a lot of them in parallel on boot tends to overwhelm the machine slightly. Once they're all up and running in a steady state, things are fine. I would typically stagger the startup of ordinary services (inside a jail, for example) by using dependencies in runit - it has a facility to pause a service until a dependent service has been started. Unfortunately, that can't work in this case because once the bhyve process has been started, the host can't tell if/when the guest has actually fully started up. As far as runit is concerned, the service is up and so any dependent services should be started too. -- Mark Raynsford | http://www.io7m.com --Sig_/T2w0M3ABGWkJVOl+1e70YTY Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQTjeVlXFhMdtOerh91nsYzB+azjRQUCXIae+wAKCRBnsYzB+azj RXasAP0Y9Gx4iHbA6o1gf46xtluFg1vbL1/HLyljnCCFVC4O/wEAoPd0ANkSb+Mz PGN/ayvBSmlq1R3kSQ0joTT+HMiIvQA= =msQ8 -----END PGP SIGNATURE----- --Sig_/T2w0M3ABGWkJVOl+1e70YTY--