Page 1 of 1
Guru Meditation crash on Windows 10 VM restart only
Posted: 27. Sep 2019, 15:56
by vbpaul
I'm running a Windows 10 Host, with a Windows 10 Pro (64-bit) virtual machine. Everything works perfectly, but in 90% of cases (but not always!) when I try to restart the VM (via the Windows "Restart" command), I get a "Guru Mediation" crash early into the boot process. Normal shutdown/bootup is always fine, it is only in the case of a "Restart" that this case happens.
This is supposed to be a standalone system, so I would like to automate restarts.
I looked through the logs (attached), and I can see a "VERR_PGM_HANDLER_NOT_FOUND" error, but I couldn't find any reference to this error.
Re: Guru Meditation crash on Windows 10 VM restart only
Posted: 27. Sep 2019, 16:14
by mpack
I had no difficulty finding past references. Perhaps you need to use a different search engine.
I would try the top hit.
https://www.google.com/search?as_q=&as_ ... by+licence
Re: Guru Meditation crash on Windows 10 VM restart only
Posted: 27. Sep 2019, 22:59
by vbpaul
Yes, I've read through many of those, but I haven't been able to find a concrete cause or solution. I am now suspecting it may be a RAM issue as I have read that PGM means "PaGed Memory manager"
Re: Guru Meditation crash on Windows 10 VM restart only
Posted: 30. Sep 2019, 15:04
by vbpaul
Update; I installed more RAM (16GB total), and allocated 8GB to the VM. This is double what it was, and the issue still persists.
I believe I have isolated the issue. The Guru Meditation crash on restart happens if the VM was turned off via a "save state", and then restored. It does not seem to happen on a fresh boot if a save state did not take place.
The reason why I wanted to do the save state is so that I could pause the VM to do a backup. I guess I will have to do a full shutdown, backup, restart now. The issue with that is that it is difficult to write a batch file that will shut down the machine, as the command to do so (acpipowerbutton) does not wait until the machine is fully shut down.
Re: Guru Meditation crash on Windows 10 VM restart only
Posted: 30. Sep 2019, 18:09
by socratis
vbpaul wrote:I looked through the logs (attached), and I can see a "VERR_PGM_HANDLER_NOT_FOUND" error, but I couldn't find any reference to this error.
A quick search for "
VERR_PGM_HANDLER_NOT_FOUND site:forums.virtualbox.org" showed:
where your problem (Restore from Saved State) seems to be the main theme...
Re: Guru Meditation crash on Windows 10 VM restart only
Posted: 30. Sep 2019, 18:35
by mpack
vbpaul wrote:I guess I will have to do a full shutdown, backup, restart now.
Hmm. Saved state crashes typically only happen if you changed your host, or changed your VirtualBox version, or changed your VM recipe, and then try to restore a now incompatible saved state.
This shouldn't arise if all you do is save state, close, backup, restart - and do full shutdowns otherwise.
Re: Guru Meditation crash on Windows 10 VM restart only
Posted: 2. Oct 2019, 19:47
by vbpaul
It doesn't happen if I do a full SHUTDOWN, but it happens when I try to do a restart from within the VM.
My original plan was to do a savestate, backup, start VM. That works. However I need to automate reboots of the VM because some of the databases that I'm running seem to need it to happen once in a while. When I tried to do this, I would get the Guru Meditation.
My best guess is that the Guru Meditation happens only after I had done a savestate, but this is not 100% confrimed. I did a few tests and was able to reboot properly (from the VM) after a start, but it could perhaps be a factor of something running after a while.
My solution now is to do an ACPIPOWERBUTTON call from a batch script to shutdown the VM completely, do the backup and then restart. In this way, I get the backup and reboot in one shot. It was a bit tricky to get the batch file working (I have to wait until the VM is fully shut down, which the vboxmanage command does not do with the acpipowerbutton call), but I got it sorted.
Re: Guru Meditation crash on Windows 10 VM restart only
Posted: 2. Oct 2019, 20:15
by scottgus1
FWIW a saved-state backup is not as good as a full-shutdown backup. When the guest is save-stated, the guest OS gets paused in a state where it thinks it is still running. Then if you have to restore the backup to other hardware (or possibly the same hardware if something has changed, even the Virtualbox version can be enough of a change) you will have to scrap the saved state, then your OS is turning on after a power-loss while running. Data corruption and loss can occur. (Databases are dirty, memory-stored caches didn't flush, etc.)
If the OS is fully shut down while backing up, then it can be restored rather more reliably.
Here's what I came up with for automatic shutdown and backup, using a Windows host batch loop with this:
Code: Select all
"C:\Program Files\Oracle\VirtualBox\vboxmanage" controlvm <vmname> acpipowerbutton
set /a statecount = 0
:waitforshutdown
"C:\Program Files\Oracle\VirtualBox\vboxmanage" showvminfo <vmname> > status.txt
find /i /n "State: powered off" status.txt > nul
if "%Errorlevel%"=="0" goto shutdowngood
find /i /n "State: saved" status.txt > nul
if "%Errorlevel%"=="0" goto shutdowngood
TIMEOUT /T 10 /NOBREAK
set /a statecount += 1
if %statecount%==180 goto guestlockedup
goto waitforshutdown
:guestlockedup
"C:\Program Files\Oracle\VirtualBox\vboxmanage" controlvm <vmname> poweroff
TIMEOUT /T 10 /NOBREAK
:shutdowngood
{continue with backup}
....
This batch segment checks if the guest is shut down (or saved), then proceed with the backup. If the guest locks up, the above code will not find the correct text in "showvminfo". A counter loop can accrue a particular amount of desired time, (in the above example, 10 seconds per loop timeout x 180 loops = 1800 seconds or a half hour delay). Then it will issue the command to kill the guest mercilessly.
I also had a heartbeat script running in the guest to write a text file in a host shared folder every 30 seconds. The full host backup script I had would also monitor for the appearance of this file, delete it, and reset the kill counter and/or resend the acpipowerbutton command or some other commands like keyboard scan codes to get the guest OS's attention. The assumption being that if the guest heartbeat script was still able to run then the guest OS was still alive and should not be killed yet.
What did you come up with?
Re: Guru Meditation crash on Windows 10 VM restart only
Posted: 3. Nov 2019, 02:07
by caspertone