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 workable.
> 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

Attachment: pgp1BzDQvTI3v.pgp
Description: PGP signature

Reply via email to