I would like to be able to revert to a snapshot taken from a running Windows Server 2008 VM, and boot it up without seeing the Windows Error Recovery screen (Windows did not shut down successfully, choose between Safe Mode and Start Windows Normally).

In Windows Server 2003 it is possible to prevent the Windows Error Recovery screen by deleting the value LastAliveStamp in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability

Although this key does still exist in Windows Server 2008, deleting it does not have the same effect.

The accepted answer for this forum post indicates that the presence of the following items on a boot indicate that the previous shutdown was abnormal:

  • The LastAliveStamp registry value from above
  • The files lastalive0.dat and lastalive1.dat in C:\Windows\ServiceProfiles\LocalService\AppData\Local

My approach so far has been to remove all of the above before taking the snapshot so that on the next boot it looks like Windows was shut down correctly.

I have tried deleting the files and the registry key before taking the snapshot, but when I revert to the snapshot and power on the VM I still see the Error Recovery screen.

I have been trying this with both Windows Server 2008 and Windows Server 2008 R2, if they each require a different solution for this I am interested in knowing them both.

Does anyone have any suggestions on how I might accomplish this, or other things I can try?

  • Try also to start MSCONFIG.EXE, go to tab BOOT and remove Safe Mode if it's checked. – user177811 Jun 14 '13 at 9:21

bcdedit works for this on win 7 ultimate (must be run with UAC off or in a cmd prompt with administrative priv's):

bcdedit /set {current} bootstatuspolicy ignoreallfailures

To restore original settings:

bcdedit /set {default} bootstatuspolicy displayallfailures


Boot Configuration Data (BCD) files provide a store that is used to describe boot applications and boot application settings. The objects and elements in the store effectively replace Boot.ini.

BCDEdit is a command-line tool for managing BCD stores. It can be used for a variety of purposes, including creating new stores, modifying existing stores, adding boot menu options, and so on.

Sources & Further reading:

EDIT: Confirmed this tool is compatible with Server 2008 here

  • This is great, just tested with Server 2008 and I'm getting the behavior I want. I am still interested in figuring out a method to make it not look like an error using registry changes (rather than just ignore the error), if there are no answers with that information this will be accepted and get the bounty. Thanks! – Andrew Clark Apr 27 '11 at 22:38
  • 2
    I mentioned the same thing over on SuperUser last month. – JdeBP Apr 27 '11 at 23:55
  • Glad I could help. I can't find any reference as to what registry values are changed or could be deleted to achieve the same affect. You might try exporting the registry before and after forcing a crash and doing a diff of the two exports to determine what values changed and playing with the results. Here's a working diff port for windows: gnuwin32.sourceforge.net/packages/diffutils.htm – iainlbc Apr 28 '11 at 0:13
  • Awesome. I can confirm that, as hoped and expected, this works with Windows 2008 Server R2. – Tony Toews Sep 19 '12 at 23:18

When you take a snapshot of a running VM you'll have a crash-consistent snapshot.

All of this can be avoided by shutting the VM down normally, then taking your snapshot when it's already off. Then each fresh boot is a full, clean boot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.