Page 1 of 1

Run VirtualBox when machine account is logged off

Posted: 4. Apr 2012, 11:57
by ericovk
I am running VirtualBox on OS X Lion Server. Runs really great with CentOS in it as a test server.
OS X Server runs, even if there are no users logged in. But VirtualBox is quitting if I log out, of if the machine goes to sleep. How can I let VirtualBox / CentOS run even if I log out/the system goes to sleep?

Re: Run VirtualBox when machine account is logged off

Posted: 4. Apr 2012, 14:34
by rpmurray
You could try enabling Fast User Switching in your account. Then instead of actually logging out you could choose the Login Window from the user account menu bar item, which would switch you to the Login Window and require you to log back in. Or if all you want to do is require a password to log back in from sleep you could enable the "require password" setting in the Security system preference (General tab)

You'd probably need to set the Energy Saver setting to only allow the display to sleep; if you have it set to "put the hard disk(s) to sleep when possible" or sleep the CPU (computer sleep) then VirtualBox will not be running while the computer sleeps.

Re: Run VirtualBox when machine account is logged off

Posted: 18. Apr 2012, 12:00
by ericovk
Thanks! Works like a charm. :D

But there is one more thing. If I don't log out with Fast user switching and OSX is logging off automatically (by sleep or screensaver lock), the VirtualBox shows a prompt for each virtual machine with the option to Save machine state / Send shutdown signal / Power off machine. If VirtualBox does that, SSH connection is lost and machines lock.

It's not the worst thing in the world. But it would be really nice to solve 8)

Re: Run VirtualBox when machine account is logged off

Posted: 18. Apr 2012, 15:32
by ChipMcK
ericovk wrote:If I don't log out with Fast user switching and OSX is logging off automatically (by sleep or screensaver lock)
Why not tell OS X to automatically not do that??