Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Apr 2012 23:33:14 -0700
From:      Neel Natu <neelnatu@gmail.com>
To:        Takuya ASADA <syuu@dokukino.com>
Cc:        freebsd-virtualization@freebsd.org
Subject:   Re: Howto close BHyVe console
Message-ID:  <CAFgRE9Ff%2Bk4KA2MCbU39dDQS5dLpmHB4c4%2BHGNn_jLSbYzKVQQ@mail.gmail.com>
In-Reply-To: <CALG4x-XsPBUBg9-NUu_9kksaX-cPU77qeRT9ByQcmEtthK2_bQ@mail.gmail.com>
References:  <CALG4x-XsPBUBg9-NUu_9kksaX-cPU77qeRT9ByQcmEtthK2_bQ@mail.gmail.com>

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

On Tue, Apr 3, 2012 at 3:39 AM, Takuya ASADA <syuu@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=3D<vm name> --destroy, but it suddenly causes pa=
nic.
> kill <bhyve pid> && vmmctl --vm=3D<vm name> --destroy had worked, so I
> guess =A0the panic reason is because /usr/sbin/bhyve still holding
> /dev/vmm/<vm name>.
>

Yup, you got that right.

best
Neel

> Takuya ASADA
> _______________________________________________
> freebsd-virtualization@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@free=
bsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFgRE9Ff%2Bk4KA2MCbU39dDQS5dLpmHB4c4%2BHGNn_jLSbYzKVQQ>