VMware Cloud Community
romatlo32
Enthusiast
Enthusiast
Jump to solution

Determine datastore space necessary in order to delete a large snapshot?

Hi folks,

I deleted a snapshot in our vSphere 5.5 environment last night and it took 4 hours.  It is an important VM and I could not help biting my fingernails during...

I am starting to research snapshot details to make sure datastore space is sufficient to delete snapshots.  Allow me to present an example.

Files/size listing for this VM is attached....

I have a VM with several separate virtual disks attached and one snapshot (size 382GB).

Could anyone suggest a general or specific calculation for how much datastore space I would need to be able to delete this snapshot?

Is it just a matter of Total GB of delta files?

snaps1.jpg

Size of snapshot according to PowerCLI.

snaps3.jpg

Free space on the datastore is 404GB.

snaps4.jpg

I added up all the delta files.  Maybe my datastore is not big enough or just too close adding high risk?

snaps5.jpg

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
bayupw
Leadership
Leadership
Jump to solution

The base/parent disk should only be able to grow up to the amount of data in the snapshots.

The picture from this KB provides a good diagram on how it all connected

Understanding VM snapshots in ESXi / ESX (1015180) | VMware KB

Worst case scenario all the delta changes are new/unique data and you will need at least ~328GB free of space (all the delta disks).

Depending on data change rate inside your VM and time required for deletion operation, you would need some extra space on the datastore as well

Here's a KB on how to estimate the time required for deletion: Estimate the time required to consolidate virtual machine snapshots (2053758) | VMware KB

Some other KBs

How to consolidate snapshots in vSphere 5.x/6.x (2003638) | VMware KB

Verifying sufficient free disk space for an ESX/ESXi virtual machine (1003755) | VMware KB

For example, assume you have a base disk of size 8 GB and 2 levels of snapshots, each of 4 GB each.

During a Remove All Snapshot Tasks, the first snapshot delta disk file can grow to a maximum of 8 GB because all new blocks from the second snapshot are written.

Any common changes stored in both snapshot levels do not require additional space.

From ESX 4.0 Update 2 and later, the snapshot mechanism has changed.

VMware ESX now incorporates improved consolidation procedures which lessen the demand of free space.

You are able to consolidate virtual machine delta disks even while minimal free space on your datastore is available.

It only says that the consolidation procedures is improved and have less free space but no sample calculation.

Delete all Snapshots and Consolidate Snapshots feature FAQ (1023657) | VMware KB

This KB also helpful for monitoring the snapshot process: Snapshot removal task stops at 99% in ESXi/ESX (1007566) | VMware KB

Just some note that once you have started the deletion/consolidation process, you shouldn't cancel the task and need to be patient.

I had an issue with snapshot consolidation where the disk was out of space, deletion/consolidation failed, and the VM is crashed/corrupted.

I had VMware GSS to help me resolve the issue.

Powering off the VM would free up some space a bit (swap files get deleted) and faster the deletion process as you don't have any data changes.

But I understand that this might not be acceptable in a production environment.

Other solution would be to clone or V2V the VM into a new VM

There are some similar threads here:

https://communities.vmware.com/thread/457376

https://communities.vmware.com/message/1996199#1996199

https://communities.vmware.com/message/2126677#2126677

Bayu Wibowo | VCIX6-DCV/NV
Author of VMware NSX Cookbook http://bit.ly/NSXCookbook
https://github.com/bayupw/PowerNSX-Scripts
https://nz.linkedin.com/in/bayupw | twitter @bayupw

View solution in original post

0 Kudos
2 Replies
bayupw
Leadership
Leadership
Jump to solution

The base/parent disk should only be able to grow up to the amount of data in the snapshots.

The picture from this KB provides a good diagram on how it all connected

Understanding VM snapshots in ESXi / ESX (1015180) | VMware KB

Worst case scenario all the delta changes are new/unique data and you will need at least ~328GB free of space (all the delta disks).

Depending on data change rate inside your VM and time required for deletion operation, you would need some extra space on the datastore as well

Here's a KB on how to estimate the time required for deletion: Estimate the time required to consolidate virtual machine snapshots (2053758) | VMware KB

Some other KBs

How to consolidate snapshots in vSphere 5.x/6.x (2003638) | VMware KB

Verifying sufficient free disk space for an ESX/ESXi virtual machine (1003755) | VMware KB

For example, assume you have a base disk of size 8 GB and 2 levels of snapshots, each of 4 GB each.

During a Remove All Snapshot Tasks, the first snapshot delta disk file can grow to a maximum of 8 GB because all new blocks from the second snapshot are written.

Any common changes stored in both snapshot levels do not require additional space.

From ESX 4.0 Update 2 and later, the snapshot mechanism has changed.

VMware ESX now incorporates improved consolidation procedures which lessen the demand of free space.

You are able to consolidate virtual machine delta disks even while minimal free space on your datastore is available.

It only says that the consolidation procedures is improved and have less free space but no sample calculation.

Delete all Snapshots and Consolidate Snapshots feature FAQ (1023657) | VMware KB

This KB also helpful for monitoring the snapshot process: Snapshot removal task stops at 99% in ESXi/ESX (1007566) | VMware KB

Just some note that once you have started the deletion/consolidation process, you shouldn't cancel the task and need to be patient.

I had an issue with snapshot consolidation where the disk was out of space, deletion/consolidation failed, and the VM is crashed/corrupted.

I had VMware GSS to help me resolve the issue.

Powering off the VM would free up some space a bit (swap files get deleted) and faster the deletion process as you don't have any data changes.

But I understand that this might not be acceptable in a production environment.

Other solution would be to clone or V2V the VM into a new VM

There are some similar threads here:

https://communities.vmware.com/thread/457376

https://communities.vmware.com/message/1996199#1996199

https://communities.vmware.com/message/2126677#2126677

Bayu Wibowo | VCIX6-DCV/NV
Author of VMware NSX Cookbook http://bit.ly/NSXCookbook
https://github.com/bayupw/PowerNSX-Scripts
https://nz.linkedin.com/in/bayupw | twitter @bayupw
0 Kudos
romatlo32
Enthusiast
Enthusiast
Jump to solution

Thank you for your response and detail!  I will close this thread.

0 Kudos