From owner-freebsd-virtualization@freebsd.org Mon Mar 11 17:28:05 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 D9964152715A for ; Mon, 11 Mar 2019 17:28:04 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 70200713DA for ; Mon, 11 Mar 2019 17:28:04 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt1-x842.google.com with SMTP id d2so5961946qti.11 for ; Mon, 11 Mar 2019 10:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=owhunB5TFLEKrJqNB8M5OLnrrb8EEztKSWmlzAtsaT8=; b=BR18pXjbyRoHfJvz+gsRL/59JyAEDXs66q2a4BsGINXt3HrOm6v9Bi7rbetWAdXyai +9sX3xOWc7jYEvg80dYeJzDekXTpZhLDRPPd/kwFxkQymVaCMAX6RtfKqv/MBN5pQ5f4 KOI9ztC90hY9361w8oCZ1WDSw+WXI4onssWvaOLSzuYA4tCO8fiOrrfryzaKQnU9SuCy mE0oDbTCvaAhUyJK2m7eC7u/VB47uI4l16QL68aEf0RyysgGer6ltK8vuPaeYsEzgTyj 26zzRaMo0pxT3pYjkDMZhi+0llPD4IFWnrXQGbKEmdNk3S11BLhyjdkSvSp5JxKTTLrV GfTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=owhunB5TFLEKrJqNB8M5OLnrrb8EEztKSWmlzAtsaT8=; b=a8J7/N8RyAFBn0FkwCP623c9nmsYe+WA5bhXdOCyDOiWMZ3yPAnW6t+/QJLQnW6NSJ kQj/Jsip/9ZICzJ1mOlpuqfAUqUMNR6CBIHfeZLfk4MwG7vyILuBKxjnVqOCoQsZAzkk FkORL3JRhP/gOPTMUUKkCObsKcQwJb5HMel+wrHMi6YwzfxqHCUQHphFneDg2zKyGh02 B2p58hUh7HVpLcWneQIs7/mmltbByjDaYr/937L3oCCajG2381mvjLy+kmamfh7vx0LU o6fDB3k7n1S2oDk+rYrg/9RUqXuqX6ch5KbS6YrmfhQgZFqfACN3SvPcP3oPRHK+yiQ+ rGjQ== X-Gm-Message-State: APjAAAVr16Dt2naWKtOSNriu8sd/cgVGP1hC69nMRl5uXRIpUHnBOrji oGTcMzetAV9raGm8KOszzvHF+kt4tcUiqA== X-Google-Smtp-Source: APXvYqxVyD75LncV4F3Sl5X+XW4PuRkpf9YN78pwN8dkELB0AMnQjmq9h/VYsKf5UzVfkGdLp2B18g== X-Received: by 2002:ac8:1209:: with SMTP id x9mr25524009qti.199.1552325283677; Mon, 11 Mar 2019 10:28:03 -0700 (PDT) Received: from mutt-hbsd ([63.88.83.108]) by smtp.gmail.com with ESMTPSA id p189sm3685556qkf.20.2019.03.11.10.28.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Mar 2019 10:28:02 -0700 (PDT) Date: Mon, 11 Mar 2019 13:27:23 -0400 From: Shawn Webb To: Mark Raynsford Cc: freebsd-virtualization@freebsd.org Subject: Re: bhyve: Detecting that a guest kernel has booted Message-ID: <20190311172723.idvwvphb4acarxvi@mutt-hbsd> References: <20190311170420.61bd34c6@almond.int.arc7.info> <20190311170853.cwjclznvsyd2wksu@mutt-hbsd> <20190311172158.1c06b5d9@almond.int.arc7.info> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rhjfcmgrep4mtrv5" Content-Disposition: inline In-Reply-To: <20190311172158.1c06b5d9@almond.int.arc7.info> X-Operating-System: FreeBSD mutt-hbsd 13.0-CURRENT-HBSD FreeBSD 13.0-CURRENT-HBSD HARDENEDBSD-13-CURRENT amd64 X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20180716 X-Rspamd-Queue-Id: 70200713DA X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.992,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TAGGED_RCPT(0.00)[org.freebsd.virtualization] 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:28:05 -0000 --rhjfcmgrep4mtrv5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 11, 2019 at 05:21:58PM +0000, Mark Raynsford wrote: > On 2019-03-11T13:08:53 -0400 > Shawn Webb 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. > >=20 >=20 > They're a mix of FreeBSD, OpenBSD, and Debian guests. So I'm guessing > one out of three of those supports it... >=20 > 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, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 Tor+XMPP+OTR: lattera@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --rhjfcmgrep4mtrv5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlyGmnQACgkQaoRlj1JF bu6f/Q/6A4f807voEYU4VNzsq+ubJxGREEVRgswN+AjB4T5afwHFVkVmpbcjIjRc JbVTNhV2oxOLjPBoG1A9rm6uf/YIcybStAAHNluEJ08XQDwcpjTuYqgtCXKkGjqj vuAuubHdMiS2LN7pcv23rinhlNylkn2a7Oogf5SFaeZ4B12R/YfhYoUCt58Tjrzn ZVBlkwlKVLdSyyxCSpyYg+Bqb9WSB9Dgl6W1uMk9YzfbhIhFHwNUvQ+lT3xFViFh iSFjjW2Dk+TpvwQH3ErNNEyeK5cuA7gYFUltMcAzRh6EZVnLiaOnD4REtUcT8hQs HwViU3LiF4AxNRabZ/z895j3+vkQ2rMdK+w2eq7hNlvo0f7i/BMXbgmsw9iRRWcM uWRCxdb54e1/mwsle0kBN0yu8qn7Sl2HEHi0CFCQCE5tqSI9QcxSb2qwJoD4kv5v v/wPtPOn1QpoJ4uwdFwUF2WUY+zRe06M/DeYwA2sMN6GXewQtnqvB2hHr1vYiLoO aJ6fJ5emZyGteL71aFUmKq4dE8nbhk2vzvbFKAHp+VhxEIJ+NVuK9lY2LoNpURtt GS6nXcEmnocMWoJAK714im1pxV/RoTyQ0sq7N+Oke3iErwQtLcxjAQnGUzjNI5yi JfrflzfTKM4uY8e5mPh8UDISMVWivh4CUzgbpuVfFmw3Lc8HDsA= =qVyS -----END PGP SIGNATURE----- --rhjfcmgrep4mtrv5--