Page 1 of 1

guests are still running, but GUIs are gone.

Posted: 14. May 2017, 19:25
by Scooby888
My late '11 MBP (on Sierra 10.12.4) has... some issues. It has VB 5.1.20, with extensions.

Recently the MBP didn't like that I was trying to move windows between spaces, so it logged me off, and I have my login screen staring at me.

I enter my password, and all of my windows come back to their previous state, except for my running guests, which are nowhere to be found on the Dock, or in any space.

However, VB Manager is back, apparently alive and well, and it says the 2 previous guests are still running (which I can see with ps.)

The guests now appear to be running headless (I can see their desktops in the preview pane,) but the VB Manager "Show" command does not work -- probably because VB still thinks they were started in GUI mode.

I've aleady tried stopping one of them via Close --> Save State, but now it fails to restart with:

Failed to open a session for the virtual machine ABC.
The virtual machine 'ABC' has terminated unexpectedly during startup because of signal 6.
Result Code: NS_ERROR_FAILURE (0x80004005)
Component: MachineWrap
Interface: IMachine {b2547866-a0a1-4391-8b86-6952d82efaa0}
I'd prefer not to have to reset the other one, but I can see no way to trick VB into putting it into headless mode using VBoxManage, and then bringing the GUI back with "Show."

This is not the first time this has happened.... just the latest permutation.

Any advice truly appreciated!

Re: guests are still running, but GUIs are gone.

Posted: 15. May 2017, 11:28
by socratis
That's something that you don't hear every day...

There are two thing I can think of: shut down the VM via "VBoxManage controlvm <vm> acpipowerbutton" (might not work if the VM is not configured for ACPI shutdown), or power down the VM via "VBoxManage controlvm <vm> poweroff", similar to pulling the power cord from a desktop computer. Then just to be safe, I would reboot the host.

As for the other VM that won't start, simply discard the saved state. It will be in the same state as if you had powered off the VM.
Scooby888 wrote:This is not the first time this has happened...
Which part? The "losing the VM window" or the "OSX puts me in the login screen"?

Re: guests are still running, but GUIs are gone.

Posted: 15. May 2017, 21:57
by Scooby888
socratis wrote:Which part? The "losing the VM window" or the "OSX puts me in the login screen"?
Thanks for the input. Losing the guest windows has happened before -- but I don't recall what preceded it then.

This auto-logoff --> losing the guests, is a first.

I ended up rebooting, and the guests came back... unfortunately losing the previous state.

Would be nice to have... VboxManage able to dynamically toggle a guest between headless and GUI.

Re: guests are still running, but GUIs are gone.

Posted: 15. May 2017, 22:03
by socratis
Scooby888 wrote:VboxManage able to dynamically toggle a guest between headless and GUI.
There is an option like that, it's called "Detachable". Start the VM like that from the downwards arrow, right next to the green Start button.

Re: guests are still running, but GUIs are gone.

Posted: 16. May 2017, 00:19
by Scooby888
10-4. That's how I run my DNS server under a Linux host,

but switching between headless and GUI while the guest is running appears to be impossible at this point in time.

Re: guests are still running, but GUIs are gone.

Posted: 16. May 2017, 00:45
by socratis
Yes, because it's a whole different mechanism/logic. In the "Normal", it's a single process. In the "Headless", it's a single process, the background without a display. In the "Detachable", it's two processes that communicate with each other.

Re: guests are still running, but GUIs are gone.

Posted: 16. May 2017, 01:42
by Scooby888
Great explanation! Many thanks.