libvirt and rebooting of a bhyve VM

Craig Rodrigues rodrigc at FreeBSD.org
Tue Aug 19 15:50:46 UTC 2014


On Tue, Aug 19, 2014 at 8:40 AM, Roman Bogorodskiy <novel at freebsd.org> wrote:
> Hi Craig,
>
> Unfortunately, I'm not sure how to get the reboot working. Moreover, I
> get the same behaviour when starting bhyve manually -- when I do a
> reboot, bhyve(8) exits as soon as the system is ready to restart.
>
> So looks like that's a default bhyve behaviour or I'm missing something?

Well, if you look at /usr/share/examples/bhyve/vmrun.sh, you
will see that byvectl --destroy --vm=xx ; bhyveload; bhyve
is run in a loop.  That loop only terminates of bhyve returns non-zero.

I don't think that this is a very good API, but that's what we have for now.

If there was some way to detect of the bhyve process exited due to
ACPI shutdown or normal reboot, that would be helpful.  That would
help people writing scripts around bhyve.
--
Craig


More information about the freebsd-virtualization mailing list