14

I'm new to virtualization and want to make sure I understand what will happen when I delete a snapshot

Say I have a tree like this

  • Base
    • SnapshotA
      • SnapshotB
        • SnapshotC

Two questions:

  1. If I delete SnapShotB does anything happen to SnapShotC?

  2. From the vmware help "Note: Clicking Delete commits the snapshot data to the parent and removes the selected snapshot." So if I have installed software or add files to SnapShotB and I delete it does that mean that software and those file get pushed to the SnapShotA?

jscott
  • 24,204
  • 8
  • 77
  • 99

2 Answers2

14

You need to rewrite that snapshot tree. The actual tree looks like this:

  • SnapshotA
    • SnapshotB
      • SnapshotC
        • Current

When you took SnapshotA, the main vmdk file was frozen and a new delta file was created. All changes were written to the delta file from that point onwards.

When you took SnapshotB, the first delta file was frozen and another delta file was created. All changes were written to this new delta file from that point onwards.

And when you took SnapshotC, the second delta file was frozen and yet another delta file was created, representing the "current" state. All changes are written to this file.

  1. If you delete SnapshotB, the first delta file will be merged with the the second delta file which represents SnapshotC. So the file backing SnapshotC will change but the actual state of SnapshotC won't change.

  2. No, a Snapshot is not modified that way. Deleting SnapshotB pushes those changes to the next file down in the tree which depends on those changes. Applying them to SnapshotA (the base vmdk) would in essence turn SnapshotA into SnapshotB, which would make snapshots unusable. :)

chankster
  • 1,324
  • 7
  • 9
4

Snapshots works differently in vSphere vs Workstation in certain case

For the questions you asked, the behavior is the same if you use VMware Workstation or VMware vSphere Client. The behavior is not the same, though, if you deleted SnapshotC.

  • SnapshotA
    • SnapshotB
      • SnapshotC
        • You are here

If you delete SnapshotC in vSphere Client, SnapshotB will become SnapshotC but retain its name. By deleting, you are committing the changes you made to SnapshotC up to SnapshotB. If you do not want to do that, you have to 'Go to' SnapshotB before making the delete like this:

  • SnapshotA
    • SnapshotB
      • You are here
    • SnapshotC

This behavior is detailed in this VMware forum post:

http://communities.vmware.com/thread/58030

In VMware Workstation, if you deleted SnapshotC while being under it, the changes would NOT be committed upwards. You would lose the changes and be back under SnapshotB.

Joseph
  • 3,787
  • 26
  • 33