From owner-freebsd-virtualization@FreeBSD.ORG Wed Aug 20 19:10:38 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 885DA2C6 for ; Wed, 20 Aug 2014 19:10:38 +0000 (UTC) Received: from mail-lb0-x229.google.com (mail-lb0-x229.google.com [IPv6:2a00:1450:4010:c04::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B8F93AC3 for ; Wed, 20 Aug 2014 19:10:37 +0000 (UTC) Received: by mail-lb0-f169.google.com with SMTP id s7so7305989lbd.28 for ; Wed, 20 Aug 2014 12:10:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=w/TDlENb1gJydeL1YvJeTEXFYUEY+J2JbH//2AmpK7s=; b=kIfAS3RjMgLDltHg8XiL8/MIGVp7AZ5tTigLBGKN8xxFdXe8EXxaQzfEiPc3N39oix NYYSVXtyYkZfqmrEMyO0KOkcK13tIsAzGQQm1o8C5TNPK47Wj0ScuxAUiSdB01c551nx TKgP8L80yNYnhKoQs5kOPEFQFxposthDt6K5STF8GzJFKFWwnX0ap+5FgXWz65eVQMtV DJd26u8G5p/eg60WekHoKwgB+MAgFkSuuwp+FT3GsAfX3hPHRx9qZczuoT+EJqqTI8R8 00iyYRjtFMaWJa0+yOzQ7eI2s6IQTrmFZMYHe//eVIqBM8iBY7/lZqkBRVl9e8qe0VU1 fOsQ== X-Received: by 10.152.9.100 with SMTP id y4mr44540084laa.26.1408561835921; Wed, 20 Aug 2014 12:10:35 -0700 (PDT) Received: from kloomba ([95.104.142.245]) by mx.google.com with ESMTPSA id y1sm14919791laj.5.2014.08.20.12.10.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Aug 2014 12:10:35 -0700 (PDT) Sender: Roman Bogorodskiy Date: Wed, 20 Aug 2014 23:09:18 +0400 From: Roman Bogorodskiy To: Kurt Lidl Subject: Re: libvirt and rebooting of a bhyve VM Message-ID: <20140820190915.GA99929@kloomba> References: <53F4CE11.4070403@pix.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: <53F4CE11.4070403@pix.net> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 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: Wed, 20 Aug 2014 19:10:38 -0000 --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Kurt Lidl wrote: > On Tue, Aug 19, 2014, Craig Rodriques wrote: > > On Tue, Aug 19, 2014 at 12:18 PM, Allan Jude = wrote: > >> > >> The name of the vm is in the title of the bhyve process, but yes, it > > > > Hmm, OK, that would require me to grep the processes and send SIGTERM > > to the right pid. > > That's not ideal, especially if I start lots of VM's, but it is workabl= e. >=20 > I would think that hacking in support to the bhyve program to use > pidfile_write() in libutil, with something like: > /var/run/bhyve.vmname.pid > as the default pathname for the pidfile would make this a lot > easier to manage from a script. IMHO, as for the pidfile, it's the thing that could be easily done in the script itself. What would be really good from my point of view is to have a control socket (Unix socket) and support for some sort of a protocol encoded in a machine readable format. So it could be used to request VM information, perform actions on it, doing a dynamic configuration (e.g. plugging devices etc). Also, it'd be easier to monitor a socket presence than a pid. Of course, all this could be done by extending bhyvectl as well. This way seems less convenient from me because from the scripting point of view command line application features are much harder to probe than doing the same via a defined protocol. Roman Bogorodskiy --LZvS9be/3tNcYl/X Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iQEcBAEBAgAGBQJT9PJbAAoJEMltX/4IwiJqPsoH/RMqlKxsBIGnHg+AAopsrao+ uLxy6e3LvyB5sXCwAYnVxQDQZTjgYHu73EncnI8quWlT1JtYDwVBIqvSvaCyXZiB lrFo6GIOkfEOsAQxSOpU1/2mO3VnRKt4EXly9I3i4oQQ2ymR9mCKCHO5Q/WnCHeA doU59z7poGp4EExW7OhCGx1My2CK6tmVclUG6ZxE+Bbjv0/7B9jfvcNfJdFQdWtm iiSPIeF+V0s4w2wxn0M/KtZjk3diDWLdOrciDXYXtmtUjJG+Krvu7mVqrPeOBRTc 7eh7FAcZ2oWgnvEm4c2FrqQLfJLFR2BRNspm7NOuHYz48xfNIsqAwOkMIUd9YRE= =gyJm -----END PGP SIGNATURE----- --LZvS9be/3tNcYl/X--