Page 1 of 1

is there a way to restart guest OS after hardware failure?

Posted: 11. Jun 2009, 17:54
by rsfeller
So I'm testing VirtualBox for use on a server at home to run my mail server separate from other server side functionality.

Latest build of VB on Win Server 2003 Standard host running the same guest OS.

I noted my mailserver was offline when I was out of town this weekend and that the host has restarted due to a prolonged power failure. Although the host started up just fine the two virual OS I have created were offline.

I'm poked around with the documentation and may have seen a post where a script was created for a linux host but I'm running it on Win Serv 2003.

thanks for any comments.

Shawn

Re: is there a way to restart guest OS after hardware failure?

Posted: 11. Jun 2009, 18:19
by Perryg
You can create a batch file that can be placed in the startup folder on windows. Use the VBoxManage startvm <vm name> The absolute path is needed if you have not created a path statement for the .virtualbox directory in Windows.

Re: is there a way to restart guest OS after hardware failure?

Posted: 11. Jun 2009, 18:24
by rsfeller
any example of what the batch file may look like inside?

Re: is there a way to restart guest OS after hardware failure?

Posted: 11. Jun 2009, 18:38
by Perryg
Say that your .virtualbox folder is on c:\users\bill\.virtualbox
And you want to start a VM called Win-xp

It would look something like this.

Code: Select all

c:
cd c:\users\bill\.virtualbox
VBoxManage startvm "Win-xp"
Save the file and call it Win-xp.cmd

Then test it to see that it works. If it does you have everything set right and can create a shortcut in the startup folder.

Re: is there a way to restart guest OS after hardware failure?

Posted: 11. Jun 2009, 18:46
by rsfeller
thank you very much!

Just to clarify since I had to change my default setup location...

is the .virtualbox folder the same as the root VDI storage location?

Re: is there a way to restart guest OS after hardware failure?

Posted: 11. Jun 2009, 18:54
by rsfeller
answered my own question. the .virtualbox folder as still the key regardless of the where the VHD files are kept.

Re: is there a way to restart guest OS after hardware failure?

Posted: 11. Jun 2009, 18:56
by Perryg
Do a search for VBoxManage.exe That will be the path to your .virtualbox folder.
Virtualbox should know where you put the VDI files

Re: is there a way to restart guest OS after hardware failure?

Posted: 11. Jun 2009, 19:01
by vbox4me2
C:
cd "C:\Program Files\Sun\xVM VirtualBox"
VBoxManage startvm VMNAME -type gui

Re: is there a way to restart guest OS after hardware failure?

Posted: 11. Jun 2009, 19:05
by rsfeller
It's working as perry suggested but there is confusion in what you say.

the EXE is in program files, the .virtualbox is (as mentioned) in the current user file and in my case the VHD files are on another hard drive. It appears the XML file in the .virtualbox location must do the dirty work.

vbox4me2 obviously has a same but different approach. Although I have not tested yet I'm sure it works. What doe the GUI switch do? Fire up the VirtualBox inteface too?