Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Aug 2014 23:09:18 +0400
From:      Roman Bogorodskiy <novel@FreeBSD.org>
To:        Kurt Lidl <lidl@pix.net>
Cc:        freebsd-virtualization@freebsd.org
Subject:   Re: libvirt and rebooting of a bhyve VM
Message-ID:  <20140820190915.GA99929@kloomba>
In-Reply-To: <53F4CE11.4070403@pix.net>
References:  <CAG=rPVcTrPPEhgQYnqLPK1Ve-JAhuAbpyGzGgbdq7BDzVW3toA@mail.gmail.com> <53F4CE11.4070403@pix.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <allanjude at freebsd.org>=
 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--



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