From owner-freebsd-virtualization@freebsd.org Mon Mar 11 18:04:42 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 8B566152837C for ; Mon, 11 Mar 2019 18:04:42 +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 3FDFF72D83 for ; Mon, 11 Mar 2019 18:04:41 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt1-x842.google.com with SMTP id b3so6131216qtj.3 for ; Mon, 11 Mar 2019 11:04:41 -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=VAVh5MWXKf042KyCbJRfBSiwWOXmDwb/LHNPTXV01wA=; b=jR/XE3iv1lP12hwpbo9BzX9+TJxXChP0c9/no1Hr96Dluyis16E/VDXOVSMptWqxqZ O/umKDzMzuvYgPePHoKK93x/R0PEdY5iL2g7+4k/F8i3zREt9SdFWoHv1IXgceB5vpdT YosmhuSpklMjtP8HS9LDzFb8dDTGnlZg5VX8CMKecxaD9lKY+A1+KgjIlFixjRKkR6NN yqHMxzgCG2HbneAX5yIh6OfFkpznEvdm0pKpgvplUZdPTLx+g3L0ngmV6fCGmiTr0ZHP 0iRGzmn4oSGMaIHqqvnRXD9xl2BQ57HWd9PoNO19e1RSe7eVem3VdqUC2lqeNqU71e+P rH6Q== 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=VAVh5MWXKf042KyCbJRfBSiwWOXmDwb/LHNPTXV01wA=; b=sSN0/YQzET2BrkB9TpzxGN8kW2NJbjvcALIYdOQNKKUQROI2ZU4yz7y8VnnfEtdaqn Q9wl3Ff7gmtYb/ilG5uB//Cdir2IAXEZ4Lrm0zfYA+PzHwNVy9vY5tZYW6fK/kykrlyK 5hQ2dmnaa0nA+vCEWM8P1GWXVtQsZztFXH0ZqhKkJkxt7W5EaaDKA89lkjRn+VwFDyG4 78eFLVe6DwF/kvqeVg7nNBpEv/R2neOlxETxMhc2VeYWBne9NN6dgEXi2WiHG9OKY5Pm HgPY1LUw+rV2UWtn2vezjV/tzkxkbE/DLpm/iC4MVuURuOP6BrZeL/aBbUw4kgVhFDtn hE+g== X-Gm-Message-State: APjAAAUAf7/iWr1yWQ50hUjYELq1AeVJ8/DhQhBCvC3OMvvv9W/CX1Du mQ4LoyBGerMKSGtjXih8GyOtsQ== X-Google-Smtp-Source: APXvYqwIvn3zoWNnT6r/wNjDH8CIxWuj2Z8ucMUtt5TDkiPw+bvCQLTssnuZhUKpFDgE609SZHLAtg== X-Received: by 2002:aed:3084:: with SMTP id 4mr26507614qtf.19.1552327480610; Mon, 11 Mar 2019 11:04:40 -0700 (PDT) Received: from mutt-hbsd ([63.88.83.108]) by smtp.gmail.com with ESMTPSA id 5sm4185622qtw.69.2019.03.11.11.04.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Mar 2019 11:04:39 -0700 (PDT) Date: Mon, 11 Mar 2019 14:03:59 -0400 From: Shawn Webb To: "Rodney W. Grimes" Cc: Mark Raynsford , freebsd-virtualization@freebsd.org Subject: Re: bhyve: Detecting that a guest kernel has booted Message-ID: <20190311180359.knal2sjbmxlgzduh@mutt-hbsd> References: <20190311172158.1c06b5d9@almond.int.arc7.info> <5c86a1e4.1c69fb81.4c2f8.a040SMTPIN_ADDED_BROKEN@mx.google.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dszkua3ez6tmcq3x" Content-Disposition: inline In-Reply-To: <5c86a1e4.1c69fb81.4c2f8.a040SMTPIN_ADDED_BROKEN@mx.google.com> 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: 3FDFF72D83 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=jR/XE3iv; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2607:f8b0:4864:20::842 as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org X-Spamd-Result: default: False [-5.57 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; MX_GOOD(-0.01)[alt1.aspmx.l.google.com,aspmx.l.google.com,aspmx2.googlemail.com,alt2.aspmx.l.google.com,aspmx3.googlemail.com]; NEURAL_HAM_SHORT(-0.82)[-0.823,0]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; IP_SCORE(-0.64)[ip: (1.68), ipnet: 2607:f8b0::/32(-2.74), asn: 15169(-2.07), country: US(-0.07)]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org:s=google]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TAGGED_RCPT(0.00)[org.freebsd.virtualization]; PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org]; DMARC_NA(0.00)[hardenedbsd.org]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2.4.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; MID_RHS_NOT_FQDN(0.50)[] 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 18:04:42 -0000 --dszkua3ez6tmcq3x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 11, 2019 at 10:58:55AM -0700, Rodney W. Grimes wrote: > -- Start of PGP signed section. > > On 2019-03-11T13:08:53 -0400 > > Shawn Webb wrote: > > > > > > If your guest OS supports it, you could probably write two scripts th= at > > > 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). >=20 > 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. Just a note: Windows systems disable inbound ICMP by default, but inbound ICMP support can be enabled post-installation. > 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. I would suggest using bhyve with UEFI. I wish a death upon bhyveload and grub2-bhyve. 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 --dszkua3ez6tmcq3x Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlyGowkACgkQaoRlj1JF bu6j3g/9FBifnhcnN1ti121uKjuswOO52dX2q1SVcX0wjynAPZJL23x9KA1pKHbX MMNNmPmGRoeh0/vQSM4MGwV6WJrDo4wPYWdMCjis/G/d1Wb6VLJO9I3enk0/w73X V18QK5IPy+i7hw8Q2UgfvkTmF2viE2rc8B/AvPJ63sN7N/JXgAa/TPE6Kt585wOD S6He54wib2vslJmchY2gKVyrXUB0QwkTEngy9a2+GAcff1tmWQO+vt2kg6mjpzbl LN0g8ibW2v0hUxIr4G2dODErF60ABaLQNw3zDma/Cco043E2w+aNAhWtPGdbqTKM 0htEKx7arBS7PQo6jd11wBc9fA35/9uq2nu7A0NelRVbOLZoYaXlhpsdmQqQucYb kEqzUNzLPPIjpzXgNMcTP9FOy1ZIF1s8CvNfYAzFHQl6EwXa4nWyl3+ZRPnrv/bH QHPbMIbnqqkkWQbLzoV7FLtLqGflLR5+QW/oTGuaMhg1A4604hn3rmPGa/iaM2dc JUn7/LDpz9Ksaj7O2ELWeT6YfU/9QszTtM8bsO7BWoY5j2UeSwOoqF6dgnCZLPNf zXX5XM7NAIkevaJkkiWSsgSyayre/3cTs9UAJaRt8WN76eXYP8vKuwjIyZ3kLoEm KyH/RuyyMVAZHjFbWbmqZ0JJMwOKCDsnoacI208ed499j3z4awk= =s8Az -----END PGP SIGNATURE----- --dszkua3ez6tmcq3x--