automatic start and savestate of headless VMs

Discussions related to using VirtualBox on Linux hosts.
Post Reply
compay
Posts: 35
Joined: 19. Sep 2008, 09:48

automatic start and savestate of headless VMs

Post 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
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: automatic start and savestate of headless VMs

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply