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

Discussions related to using VirtualBox on Windows hosts.
Post Reply
rsfeller
Posts: 17
Joined: 10. May 2008, 22:22

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

Post 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
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

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

Post 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.
rsfeller
Posts: 17
Joined: 10. May 2008, 22:22

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

Post by rsfeller »

any example of what the batch file may look like inside?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

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

Post 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.
rsfeller
Posts: 17
Joined: 10. May 2008, 22:22

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

Post 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?
rsfeller
Posts: 17
Joined: 10. May 2008, 22:22

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

Post by rsfeller »

answered my own question. the .virtualbox folder as still the key regardless of the where the VHD files are kept.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

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

Post 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
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

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

Post by vbox4me2 »

C:
cd "C:\Program Files\Sun\xVM VirtualBox"
VBoxManage startvm VMNAME -type gui
rsfeller
Posts: 17
Joined: 10. May 2008, 22:22

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

Post 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?
Post Reply