VMware Cloud Community
AntonVZhbankov
Immortal
Immortal
Jump to solution

Commiting snapshots

Let's imagine we have VM with several snapshots and want to 'delete all'.

What would be the exact ESX action sequence to commit all snapshots at once?


---

MCSA, MCTS, VCP, VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, HPE ASE, MCITP: SA+VA, VCP 3/4/5, VMware vExpert XO (14 stars)
VMUG Russia Leader
http://t.me/beerpanda
Tags (1)
0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

Take a look at Duncan's blog post about this: http://www.yellow-bricks.com/2008/01/07/delete-all-snapshots/

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

View solution in original post

0 Kudos
8 Replies
lamw
Community Manager
Community Manager
Jump to solution

Take a look at Duncan's blog post about this: http://www.yellow-bricks.com/2008/01/07/delete-all-snapshots/

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
AntonVZhbankov
Immortal
Immortal
Jump to solution

So latest delta is merged into previous snapshot and then snapshot to snapshot before etc. This makes sense.

But why can't they delete deltas immediately after each delta is merged, only after all deltas are merged? It can take space up to number of snapshot * disk size...

Thanks.


---

MCSA, MCTS, VCP, VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, HPE ASE, MCITP: SA+VA, VCP 3/4/5, VMware vExpert XO (14 stars)
VMUG Russia Leader
http://t.me/beerpanda
0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

I'm thinking perhaps they're protecting the deltas in case the datastore runs out of space unexpectedly ... though even in this scenario I'm not sure what the state of the VM would be. Probably easy way to test but I'm thinking it's just for protection to ensure all snaps have been merged before deleting the deltas is my guess

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
AntonVZhbankov
Immortal
Immortal
Jump to solution

In cases I've met storage runs out of space BECAUSE they keep all deltas till end of merge and with each iteration deltas are growing.

1TB datastore, 500 GB of VMs. One VM has 100 GB disks, and for some reason (problems with backups for ex) 6 snapshots. You select to delete all snapshots.

You have 50% free space and 100GB VM, but you actually can run out of space because in the merge process deltas can take up to 600 GB. Isn't that a little bit weird?


---

MCSA, MCTS, VCP, VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, HPE ASE, MCITP: SA+VA, VCP 3/4/5, VMware vExpert XO (14 stars)
VMUG Russia Leader
http://t.me/beerpanda
0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

Interesting ... well I'm a believer that snapshots are meant to be short lived, though not everyone understands that and how some users get into issues where they have multi-snapshots 100+GB or sometimes in TB. One big miss-understanding is that each snapshot can grow up to the original size and as you mention when you start to commit all of these, you'll need a boat load of space. I guess probably the recommendation is to NOT do a delete all or commit all, if you have huge snapshots, probably a good best practice to commit one at a time.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
AntonVZhbankov
Immortal
Immortal
Jump to solution

Yeah, I absolutely agree that snapshots can exist for short time only on production VMs. But today I found that for some reason not all snapshot from backup are deleted on file server. Also I've got some lock problems with this VM after migration to new cluster.

I hadn't run out of space, but I was near to it and it took a looong time to commit all these accidental snapshots while file server was down.

But I heard that a lot of people met problem with space. Especially it is painful when such accidental shapshots fill out all your datastore and all VMs on it just freeeze. And You have no free space to commit a single snapshot!


---

MCSA, MCTS, VCP, VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, HPE ASE, MCITP: SA+VA, VCP 3/4/5, VMware vExpert XO (14 stars)
VMUG Russia Leader
http://t.me/beerpanda
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

if all else fails use converter to move the guest to a different LUN, that will commit all the snapshots too

0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

I would say if organization is going to make use of snapshots in general, that they should implement some monitoring the environment of snapshots and know every day/week/etc. which VMs have what snapshots, their sizes and who created them and the expected "delete/commit" of the snapshots.

In the past, I wrote a shell script (before I was familiar with the VI/vSphere API) to basically update a report which was posted on our intranet for us to monitor. Today, there are plenty of 'reports', including alarms that can be created using vSphere SDK for Perl or PowerCLI (take your pick) and setup either reports or alarms. This will aide in understanding what VMs have what snapshots and what size they've grown, though not everyone understands how snapshots work and hence this type of monitoring never make it to their radar.

Good luck on getting those snap committed.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos