How do i auto restart guest after 'Guru Meditation'?

This is for discussing general topics about how to use VirtualBox.
Post Reply
siers
Posts: 2
Joined: 26. Dec 2011, 10:31
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows XP

How do i auto restart guest after 'Guru Meditation'?

Post by siers »

Hi All,

My first post here after I had a look around but couldn't find an answer.

Is there anyway to have a guest session auto restart if it encounters an error (such as the Guru Meditation?)

I would prefer the system to just restart and tell me an error happened, not just stop and wait?

I do run an app called 'Restart on Crash' that monitors the process and reinitializes the guest if it crashes or is not responding - but the 'Guru Meditation' keeps the process running and it can't detect that the guest is no longer running.

Or is there another way to monitor if the guest is running?

Thanks,
Jeff
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: How do i auto restart guest after 'Guru Meditation'?

Post by Technologov »

use "GuestControl execute"... if not beeping for 5 min, u can restart VM.
siers
Posts: 2
Joined: 26. Dec 2011, 10:31
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows XP

Re: How do i auto restart guest after 'Guru Meditation'?

Post by siers »

Thanks for the info, but I can't find any details about 'beeping' in the sub commands for vboxmanage guestcontrol.

Can you elaborate more on what command you are referring to?

Thanks,
Jeff
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: How do i auto restart guest after 'Guru Meditation'?

Post by Technologov »

Do like this:

GuestExecute command: (Linux guests)
VBoxManage guestcontrol "my VM" execute --image "/bin/uname" --username root --password 123456 --wait-stdout -- -a

GuestExecute command: (Windows guests)
VBoxManage --nologo guestcontrol "Windows 2000" execute --image "c:\windows\system32\ping.exe" --username Administrator --password 123456 --wait-exit --wait-stdout -- 127.0.0.1 -n2

If no output or if wrong output... restart VM.
glenhawk
Posts: 1
Joined: 2. Feb 2012, 02:20
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Win7

Re: How do i auto restart guest after 'Guru Meditation'?

Post by glenhawk »

I am relatively new to VirtualBox. I have been using it on Ubuntu for several years but only the basics.

I now run a Win7 guest on my Ubuntu "server" (not technically a server but always on) to do CCTV recording. There have been a few occasions where the VirtualBox has crashed so being able to automatically restart it is of great interest to me.

I visited the vboxmanage-guestcontrol page on the online manual to get some more information about your solution.

I think I understand the theory but I am not sure how to put it into practice.
I have used VBoxManage to clone HDD images so I recognise that it is a terminal command. Am I supposed to use your VBoxManage lines in a script to achieve an auto-restart?
I assume that this "script" would want to run continually, am I instead needing to run it as a service?

I have tried running your (windows guests) line in a terminal while the Win7 guest is running (with my VM name entered) and I just get...
Syntax error: Incorrect parameters

Can you help me?
Post Reply