Page 1 of 1

automatic start and savestate of headless VMs

Posted: 17. Apr 2009, 10:54
by compay
I have VirtualBox 2.2.0 installed on Ubuntu8.04
And I have two headless VMs running under user "A" on the host.
One headless VM act as a server and one headless VM act as a Desktop via rdp-connection.
What I want is, that these VMs start automatically, when a second user "B" starts up the host and savestate automatically and complete, when user B shuts down the host.
I've found a HowTo at: http://www.glump.net/howto/virtualbox_as_a_service
But neither the automatic shutdown where "/etc/default/virtualbox" and "/etc/init.d/vboxdrv" is involved,
nor the init-script for automatic starting worked for me.
Is it essential to run them VMs as a service, or is it also possible to start them via rc.local?
I'm not the only one who made the experience that automatic savestate does not work via vboxdrv and the corresponding entries in /etc/default/virtualbox. What changes I have to make for the VBox Version 2.2.0 to solve it?

Do you have any hints or suggestions?

Greetings

Re: automatic start and savestate of headless VMs

Posted: 18. Apr 2009, 13:01
by Sasquatch
Crossposting isn't allowed here, please stick to one topic. I've removed your crosspost to keep it clean.

What you fail is some reading skills. You don't need /etc/init.d/vboxdrv, that is the script that starts and compiles the kernel module, not start and stop a VM. What you need to do is read the manual and learn about the different front-end options available in VB. VBoxManage is one, VBoxHeadless is another. The latter is what you need to run as startup, as that won't spawn a GUI, but keeps the VM in the background ready to be accessed through VRDP.