Date: Tue, 19 Aug 2014 13:32:48 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-virtualization@freebsd.org Subject: Re: libvirt and rebooting of a bhyve VM Message-ID: <201408191332.48730.jhb@freebsd.org> In-Reply-To: <CAG=rPVdGuuKuYsPKy%2BO5o8i_fOZ8qrxh27N%2BY2dNVysXapu13A@mail.gmail.com> References: <CAG=rPVcGFSnMcMdrNtWjUtHUc0RLXps-t9WwzokNtyHQwWDfFQ@mail.gmail.com> <20140819154035.GA62903@kloomba> <CAG=rPVdGuuKuYsPKy%2BO5o8i_fOZ8qrxh27N%2BY2dNVysXapu13A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, August 19, 2014 11:50:43 am Craig Rodrigues wrote: > On Tue, Aug 19, 2014 at 8:40 AM, Roman Bogorodskiy <novel@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. The exit code is different. An ACPI shutdown uses an exit code of 1 whereas a reboot uses an exit code of 0 IIRC. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408191332.48730.jhb>