VMware Cloud Community
phenrichs
Enthusiast
Enthusiast

Error when trying to revert to snapshot

I am trying to revert to a snapshot of a vm and I get the following error....

"Error encountered trying to restore CPU state from file "vmfs/volumes/............/.vmsn"

We have been troubleshooting some performance issues on this vm. I have added a virtual processor since the target snapshot was created. I also have deactivated hyperthreading for esx since the target snapshot was created.

Do I need to undo any of these things in order to revert?

The issue is that no matter how much cpu I give this vm it still locks up. It is a server 2003 R2 (32bit) vm. It runs a scripted app to build code. That shows in task manager while running that cpu is between 50 and 100%. The performance tab of the vm shows between 40 and 60 % because I have granted it more than it can use. I have granted it 6GB of memory even though server2003 will only see 4. The host barely breaks a sweat while this app is running. When it finishes running the vm still acts like all its cpu is uitilized even though task manager, the vm performance tab, and the host all show its cpu and memory at idle. I believe it to be an issue with the guest os but to prove I would like to revert to a snapshot but I get the error above.

Thanks for any help.

Tags (1)
Reply
0 Kudos
14 Replies
RParker
Immortal
Immortal

The performance tab of the vm shows between 40 and 60 % because I have granted it more than it can use. I have granted it 6GB of memory even though server2003 will only see 4

32-bit Windows 2003 can 'see' up to 32GB of RAM. Just FYI, unless you have standard. If it doesn't see the RAM, something is wrong, it's definately higher than 4GB. But if you allocate 6GB and your version of Windows is limited to 4GB, then you are wasting 2GB, over allocating isn't going to help you out at all, I would leave it at 4GB.

you most likely have registry issues, I would run a good registry fix / cleaner and reboot the clean out that registry, and try again.

In dealing with snapshots keep in mind they are LONG operations, and sometimes the VC is pre-set to time out after 120 seconds, so the error is just VC waiting for the response from the snapshot completion, its still attempting in the background.

Reply
0 Kudos
phenrichs
Enthusiast
Enthusiast

Good point on the memory I was thinking of XP. I have given it 6 but it has only ever used 4.

Any idea on the snapshot error?

Reply
0 Kudos
RParker
Immortal
Immortal

Any idea on the snapshot error?

They are just plain finicky. I have had many errors myself, I finally just tell people not to use them, if you do they are at your own risk, and I will not restore VM's that have snapshots, because people don't heed my warnings.

I think its silly to have to keep reminding people to do stuff to protect THEIR own data. You want to corrupt data, well eventually you will learn.... When you have to start over.

Any way, for your problem I think it's just waiting to commit all the changes. Whatever you do don't touch it. You can risk losing a VM completely. I have found no matter what, that they WILL finish committing the data, it just make take longer than you expect.

Reply
0 Kudos
phenrichs
Enthusiast
Enthusiast

I received the following error just now when trying to revert the snapshot with the vm shutdown.

Host CPU is incompatible with the virtual Machine's requirements at CPUID level 0x8000000 1 register 'edx'.

Host bits: 0000:0000:0000:0000:0000:0000:0000:0000

Required: 00x0:0000:0001:0000:0000:x000:0000:0000

Mismatch detected for these features:

*NX/XD (data execution protection). If the virtual machine does not need this feature, power off the virtual machine and remove the NX/XD requirement by editing the virtual machine settings(advanced options).

In the settings wizard for this vm, under the options tab, there is a CPUID Mask that has the options for hiding the NX flag. It is greyed out and not editable. Is this what the error is referring to? Or is this referring to the No Execute Memory Protect option in the host bios? The bios was updated a couple weeks ago so perhaps this got changed and I didn't realize it?

Reply
0 Kudos
RParker
Immortal
Immortal

The bios was updated a couple weeks ago so perhaps this got changed and I didn't realize it?

Yes, I would change it back if you can.

Reply
0 Kudos
Lightbulb
Virtuoso
Virtuoso

Interesting problem. Checkout this thread http://communities.vmware.com/message/1103328 one of the posts relates to this issue. You can edit the vmx file and point the scsi file entry to the original vmdk then boot your system. In this way you would get a crash consistent reversion. Not sure this is an option now.

Perhaps if you can determine what BIOS CPU value was set to default. You might want to call support on this one.

Reply
0 Kudos
phenrichs
Enthusiast
Enthusiast

I saw a post with a similar issue and it was stated there that after fixing the bios you should rebuild the host.

Is this true? Do I need to reinstall the esx portion of the system. It is easy enough I just have the headache of scheduling downtime.

Reply
0 Kudos
phenrichs
Enthusiast
Enthusiast

Sorry, so this is telling me that the no execute flag should be on in the bios, or off? I want to be very clear before I make changes. I did a esxcfg-info -w|grep HV* and discovered that the hyperthreading was not enabled as it was before either so some bios changes were definitely not saved.

Reply
0 Kudos
AndreTheGiant
Immortal
Immortal

Have you done some BIOS upgrade recently?

Andre

**if you found this or any other answer useful please consider allocating points for helpful or correct answers

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
Reply
0 Kudos
phenrichs
Enthusiast
Enthusiast

Yep

Reply
0 Kudos
RParker
Immortal
Immortal

Sorry, so this is telling me that the no execute flag should be on in the bios, or off?

It should be enabled so that the VM can be exposed to the flag, so I would say ON.

Windows

When NX is supported, it is enabled by default. Windows allows programs to control which pages disallow execution through its API as well as through the section headers in a PE file.

In the API, runtime access to the NX bit is exposed through the Win32 API calls VirtualAlloc[Ex] and VirtualProtect[Ex]. In these functions, a page protection setting is specified by the programmer. Each page may be individually flagged as executable or non-executable. Despite the lack of previous x86 hardware support, both executable and non-executable page settings have been provided since the beginning. On pre-NX CPUs, the presence of the 'executable' attribute has no effect. It was documented as if it did function, and, as a result, most programmers used it properly.

In the PE file format, each section can specify its executability. The execution flag has existed since the beginning of the format; standard linkers have always used this flag correctly, even long before the NX bit.

Because of these things, Windows is able to enforce the NX bit on old programs. Assuming the programmer complied with "best practices", applications should work correctly now that NX is actually enforced. Only in a few cases have there been problems; Microsoft's own .NET Runtime had problems with the NX bit and was updated.

Reply
0 Kudos
AndreTheGiant
Immortal
Immortal

Yep

Is your server a Dell PowerEdge?

Andre

**if you found this or any other answer useful please consider allocating points for helpful or correct answers

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
Reply
0 Kudos
phenrichs
Enthusiast
Enthusiast

No HP ML 570 G3

Reply
0 Kudos
AndreTheGiant
Immortal
Immortal

I've got a similar problem after a BIOS update that has change the default configuration of NX bit.

Andre

**if you found this or any other answer useful please consider allocating points for helpful or correct answers

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
Reply
0 Kudos