VMware Server 2

"Lock this snapshot" gets reverted after revert to snapshot

This appears to be a bug in VMware Server 2. Tested with version 2.0.2.

Whether a snapshot is locked or not is determined by setting the snapshot.protected option in the .vmx file to either TRUE or FALSE.
A snapshot needs to exist before you are able to set “Lock this snapshot”.
When you create a snapshot the contents of the .vmx file are copied to the .vmsn file of the snapshot, at that time the snapshot.protected option is either set to FALSE or not present at all in the .vmx file.
If you then set the “Lock this snapshot” option the value of snapshot.protected is set to TRUE in the .vmx file, but the value of snapshot.protected is not updated in the .vmsn file.
When you revert to the snapshot the .vmx with snapshot.protected set to TRUE is overwritten with the version from the .vmsn file, which either is set to FALSE or doesn't exist.

To work around this bug try the following:

  1. Remove the VM from the VMware Server inventory.
  2. Backup the VM files so you can go back if something goes wrong.
  3. Open the .vmx file. If snapshot.protected is set to FALSE, set it to TRUE. If snapshot.protected is not present, add
    snapshot.protected = "TRUE"

    to the file. Save the .vmx file.

  4. Open the .vmsn file in something like Notepad2 (tested with version 4.1.24), notepad on Windows 7 is not fit for this task. If snapshot.protected is set to FALSE, set it to TRUE. If snapshot.protected is not present, add snapshot.protected = “TRUE” to the file. Save the .vmsn file.
  5. Add the VM to the VMware Server Inventory.

The snapshot should now be locked and stay locked. Test it by reverting to snapshot, the snapshot should still be locked after that.