SOLVED: Automatic startup/shutdown of Virtualbox with HDA

techlife
Posts: 63
Joined: Sat Dec 18, 2010 3:26 pm

SOLVED: Automatic startup/shutdown of Virtualbox with HDA

Postby techlife » Thu Dec 30, 2010 11:43 am

As the title implies, I am looking for a way (script?) to automatically start a specific VM when the server starts up and shutdown when the HDA does. The VM should be the last thing to startup and the first thing to shutdown when the commands are received. Are there Amahi startup and shutdown scripts that I could add a command for this to? Is there a better way perhaps?

Please note, I DO NOT run the server headless and I DO NOT want my VM to run headless either.

Any help would be greatly appreciated!
Last edited by techlife on Fri Jan 07, 2011 8:47 pm, edited 1 time in total.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Automatic startup/shutdown of Virtualbox with HDA?

Postby bigfoot65 » Thu Dec 30, 2010 3:42 pm

Hello,

Suggest you check http://www.virtualbox.org as this is software specific. Google might help as well.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

techlife
Posts: 63
Joined: Sat Dec 18, 2010 3:26 pm

Re: Automatic startup/shutdown of Virtualbox with HDA?

Postby techlife » Thu Dec 30, 2010 6:14 pm

Hi & Thanks for the reply.

I've spent the last two days Googling and trying to get this figured out. I am trying over on the VBox forum as well as Fedora. I was hoping someone here may have had a similar need and already found a solution. Or, as I mentioned, that there may be an Amahi startup/shutdown script in which I could add a command to.

Thanks anyway!

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Automatic startup/shutdown of Virtualbox with HDA?

Postby bigfoot65 » Thu Dec 30, 2010 7:16 pm

Understand. Maybe you can set the vm to start using the CLI vbox manage. You could add the command to start the vm in your user crontab. Something like:

@reboot VBoxMange startvm [vm name]

This would execute the command on reboot. So if you can make it start the vm CLI with vboxmanage, then this should work.

Here is some help with the CLI for VirtualBox.

http://www.howtoforge.com/vboxheadless- ... -11-server
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

techlife
Posts: 63
Joined: Sat Dec 18, 2010 3:26 pm

Re: Automatic startup/shutdown of Virtualbox with HDA?

Postby techlife » Fri Jan 07, 2011 8:40 pm

Thanks for the lead, Bigfoot.

I finally got it working by running it as a service using the info here as a baseline http://www.kernelhardware.org/virtualbo ... ra-redhat/ and pulling in a friend to help me modify the script to fit my needs. (For anyone looking at the link...the text file link they provided me at the bottom was USELESS!)

It took us two days of trial and error but it was well worth it. It works like a dream... =)

Who is online

Users browsing this forum: No registered users and 13 guests