Howto close BHyVe console
Neel Natu
neelnatu at gmail.com
Wed Apr 4 06:33:20 UTC 2012
Hi Takuya,
On Tue, Apr 3, 2012 at 3:39 AM, Takuya ASADA <syuu at dokukino.com> wrote:
> Hi,
>
> Just for a little question,
> I could run BHyVe on my PC with neel's guest image by following CFT
> page(http://callfortesting.org/bhyve/), it just worked without
> problem, but I couldn't shutdown guest OS safely.
> shutdown command in guest OS doesn't poweroff the VM, and I have no
> idea to close bhyve console.
> Is there any shortcut-key or commands to shutdown it?
>
If you type "quit" or "reboot" at the loader prompt in the guest it
will exit with a non-zero exit code. You could modify the script that
launches the 'bhyveload' and 'bhyve' programs to quit if the exit code
is non-zero.
Something like this, perhaps:
while [ 1 ]; do
# Launch the userboot loader
bhyveload <args> ...
if [ $? -ne 0 ]; then
exit 1
fi
# Launch bhyve
bhyve <args> ...
if [ $? -ne 0 ]; then
exit 1
fi
done
> I also tried vmmctl --vm=<vm name> --destroy, but it suddenly causes panic.
> kill <bhyve pid> && vmmctl --vm=<vm name> --destroy had worked, so I
> guess the panic reason is because /usr/sbin/bhyve still holding
> /dev/vmm/<vm name>.
>
Yup, you got that right.
best
Neel
> Takuya ASADA
> _______________________________________________
> freebsd-virtualization at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe at freebsd.org"
More information about the freebsd-virtualization
mailing list