VMware Cloud Community
MichaelLeone
Enthusiast
Enthusiast
Jump to solution

Confirm: Have 4 snapshots; want to remove the 2 middle snapshots, leaving the first and last

I thought I understood this, but am getting confused after searching further. ESXi 5.5 U2. I have a VM that has 4 snapshots:

2015-12-30

2016-01-04

2016-01-05-Morning

2016-01-05-Evening (latest snapshot)

I am told we need to keep the snapshot as of 2015-12-30, and the latest 2016-01-05-Evening. We don't need the other 2; we will not be reverting back to those snapshots, but might need to revert back to  the state of 2015-12-30 or 2016-01-05-Evening.

So I can just delete the 2 middle snapshots, correct? And yet still be able to revert back to the state of 2015-12-30 or 2016-01-05-Evening, if needed?

But does it matter in what order I delete them? Can I just delete them sequentially (i.e., delete 2016-01-04, and then 2016-01-05-Morning)?

Sorry if it seems like a newbie question, but I've never deleted some snapshots, leaving others like this. I've either deleted all of them, or just deleted the most recent; I've never deleted snapshots in the middle of a sequence like this before.

Screenshot of snapshots attached.

0 Kudos
1 Solution

Accepted Solutions
BenLiebowitz
Expert
Expert
Jump to solution

Okay, let me explain it like this... 

VM Created Original.vmdk

2015-12-30 snapshot created.  original-00001.vmdk created for changes.

2016-01-04 snapshot created.  original-00002.vmdk created for changes.

2016-01-05-Morning snapshot created.  origianl-00003.vmdk created for changes.

2016-01-05-Evening snapshot created.  original-00004.vmdk created for changes. 

When you delete the 2016-01-04 and 2016-01-05-Morning snapshots, those changes are rolled up into the original-00004.vmdk, so if you revert back to that snapshot, it contains everything, instead of having to access the data among 3 different VMDKs. 

Does that explain it better?

Ben Liebowitz, VCP vExpert 2015, 2016, & 2017 If you found my post helpful, please mark it as helpful or answered to award points.

View solution in original post

0 Kudos
6 Replies
BenLiebowitz
Expert
Expert
Jump to solution

The short answer is, you can safely delete those in-between snapshots without it affecting the other snapshots. 

Whenever you create a snapshot, the original VMDK is put into a read-only state, and a new VMDK is created for the changes.  When you delete a snapshot, you're committing the changes back into the original VMDK.  So you'll be committing the changes from the "2016-01-04" and "2016-01-05-Morning" snapshots, but the changes for the other snapshots will remain separate.

Ben Liebowitz, VCP vExpert 2015, 2016, & 2017 If you found my post helpful, please mark it as helpful or answered to award points.
0 Kudos
MichaelLeone
Enthusiast
Enthusiast
Jump to solution

See, that's where I get confused. If I commit the changes for "2016-01-04" and "2016-01-05-Morning", doesn't that mean they get committed (applied) to the parent, 2015-12-30? Won't that change the state of 2015-12-30? How then I can be able to revert back to the state of 2015-12-30, after deleting (committing) those 2 snapshots? That's what they want to be able to do.

I get that the "2016-01-05-Evening" has all the changes from 2016-01-04 and 2016-01-05-Morning in it (it has to, as those changes were active at the time of the latest snapshot.

Thanks, sorry if I'm just being slow.

0 Kudos
BenLiebowitz
Expert
Expert
Jump to solution

Okay, let me explain it like this... 

VM Created Original.vmdk

2015-12-30 snapshot created.  original-00001.vmdk created for changes.

2016-01-04 snapshot created.  original-00002.vmdk created for changes.

2016-01-05-Morning snapshot created.  origianl-00003.vmdk created for changes.

2016-01-05-Evening snapshot created.  original-00004.vmdk created for changes. 

When you delete the 2016-01-04 and 2016-01-05-Morning snapshots, those changes are rolled up into the original-00004.vmdk, so if you revert back to that snapshot, it contains everything, instead of having to access the data among 3 different VMDKs. 

Does that explain it better?

Ben Liebowitz, VCP vExpert 2015, 2016, & 2017 If you found my post helpful, please mark it as helpful or answered to award points.
0 Kudos
MichaelLeone
Enthusiast
Enthusiast
Jump to solution

AH. Now I get it - I was thinking that the changes committed back up to the *earlier* snapshot 2015-12-30; no, they commit down to the *later* snapshot 2016-01-05-Evening. As, of course, they should - those changes were active and in place at the time of the creation of 2016-01-05-Evening.

That explains it - I was thinking in the wrong direction. 🙂

Thanks. I am deleting now ...

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

So I can just delete the 2 middle snapshots, correct? And yet still be able to revert back to the state of 2015-12-30 or 2016-01-05-Evening, if needed?

Correct.

But does it matter in what order I delete them? Can I just delete them sequentially (i.e., delete 2016-01-04, and then 2016-01-05-Morning)?

Deleting a snapshot will merge its changed blocks into its direct parent's .vmdk file, so it makes sense to delete the snapshots in the way you mentioned. Doing it the other way around will work too, but the data from the later snapshot will actually be copied twice this way.

Reverting to a snapshot will not use the data in the associated snapshot .vmdk file, but start with the state of its parent virtual disk, i.e. the point in time when the snapshot as created.

André

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

snapshot.jpg

Maybe the above image will explain this better.

The colored squares represent the snapshot .vmdk files created with each snapshot. The red one belongs to 2015-12-30, yellow to 2016-01-04, ...

Once you delete the 2 snapshots in the middle, their data (yellow and green) will be merged into the first snapshot's delta file (red), which contains data that was changed after creating this snapshot. However, going to a specific snapshot will always go to the beginning of that snapshot, i.e. the time it was created.

André

0 Kudos