FAQ: Delete all Snapshots and Consolidate Snapshots Feature
search cancel

FAQ: Delete all Snapshots and Consolidate Snapshots Feature

book

Article ID: 371714

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware vCenter Server

Issue/Introduction

This article provides information related to the VMware "snapshot deletion" process, both Delete all snapshots and Delete snapshot process. This article also describes the impact on the delta disks of the "Delete all snapshots" process also known as the "Consolidation process".

Resolution

Deleting Snapshots

Deleting a snapshot removes the snapshot from the Snapshot Manager. The VMware snapshot files are consolidated and written to the parent snapshot disk and merge with the virtual machine base disk.

Deleting a snapshot does not change the virtual machine or other snapshots. Deleting a snapshot consolidates the changes between snapshots and previous disk states and writes all the data from the delta disk that contains the information about the deleted snapshot to the parent disk. When you delete the base parent snapshot, all changes merge with the base virtual machine disk.

Delete

Use the Delete option to remove a single parent or child snapshot from the snapshot tree. Delete writes disk changes that occur between the state of the snapshot and the previous disk state to the parent snapshot.

Note: Deleting a single snapshot preserves the current state of the virtual machine and does not affect any other snapshot.

You can also use the Delete option to remove a corrupt snapshot and its files from an abandoned branch of the snapshot tree without merging them with the parent snapshot.
 

Delete All

Use the Delete All option to delete all snapshots from the Snapshot Manager. Delete all consolidates and writes the changes that occur between snapshots and the previous delta disk states to the base parent disk and merges them with the base virtual machine disk.

 
Delete all snapshots operation will commit every snapshot of the chain directly to the Base Disk(s) of the virtual machine. With this new algorithm:
  • If the Base Disk is preallocated (thick provision), no extra space is required for the Delete all operation. The Base Disk will not grow as it is preallocated or thick.
  • If the Base Disk is non-preallocated (thin provision), the base disk will grow only on committing information from the snapshots. Each thin provision disk may grow up to its maximum size as mentioned in the Provisioned Size option in the virtual machine settings for the disk.

Note: Time taken in Converting a Thin provisioned disk to a Thick provisioned disk depends on the size of the virtual machine disks, performance of the underlying storage device and also if the VM is running on snapshot, the snapshots would also go through a consolidation process. 
 

You can check the Summary tab of the virtual machine to know how much the virtual machine disk utilization can grow. The difference between Provisioned Storage and Used Storage in the right panel indicate how much the Base Disks can grow.

However, if the virtual machine has disks in different datastores, this amount of storage space is shared between them.

What files get locked during the Delete all operation?

All flat and delta files that are used by the chain of snapshots are locked.

How to monitor the status of the Consolidation Process?

There is no way to accurately determine the progression of the commit process and the progression bar in the VMware vSphere Client may not report the accurate percentage and/or may appear to be stuck. As long as the files are being read /written and the time stamps on the files continue to update, the process is working.
 

How long is the consolidation going to take?

It is not easy to accurately determine how long the process will take. Many factors will directly and indirectly impact the time required to complete the process such as size/number of delta files, load/performances on the SAN, etc. However, you can use one of these techniques to estimate or get a worst case scenario of the time required.
  1. If the process is already started, you may monitor the throughput through esxtop or looking at the vCenter Server performance charts. You can then estimate the time based on the aggregated size of the delta files.
  2. Before you start the process, you may simulate a disk clone operation. This technique might not give you the most accurate estimation but it should provide a worst case scenario. If the delta files are numerous / large, it is the safest option as it does not require to start the process and no changes are made into the base disk. However, it requires the virtual machine to be shutdown.

Can I change the type of the virtual disks when it has snapshots?

  • When you clone the virtual machine running on snapshot will result in creating a consolidated disk (only base disk) with no snapshot chain. 
  • If you clone from Service Console, you can select any type of disk for the destination. However, you cannot clone from the Service console if the virtual machine is running.

 

If cloning snapshots to a new virtual disk, what If I clone a disk that uses a VMware Paravirtual controller?

If you cloned the virtual disk using the host CLI you might run in to issues. Running the vmkfstools -i command creates a cloned drive with an LSI controller, even if the source disk is using VMware Paravirtual. This results in the virtual machine failing to boot. To resolve this issue, change the controller type to the same as the source.
 
For related information, see:


What is the difference between running the process while the virtual machine is powered on and when it is powered off?

If the virtual machine is running when you click Delete all from the interface or run vmware-cmd <cfg> removesnapshots, an additional snapshot is created to accommodate the incoming I/O while all the other snapshots get committed to the Base Disk. The size of the snapshot can grow depending on the I/O activity. It is ideal to reduce the I/O activity to facilitate the process.
 
That last snapshot will commit to the base disk at the very end of the process. After this, all the snapshot files are deleted.

Note: If the virtual machine is powered off, no additional free space is required and the process will complete faster as there is no need track writes and the additional snapshot and delta file are not created as part of the process.
"If the Base Disk is non-preallocated (thin provision), the base disk will grow only on committing information from the snapshots. Each thin provision disk may grow up to its maximum size as defined in the Provisioned Size option in the virtual machine settings for the disk."
 

Will each snapshot file get deleted as soon as it gets committed to the base disk, releasing space on the datastore?

No. All files are deleted together for particular virtual disk after completing the process. Once all the snapshots are committed for one virtual disk, all the files for that virtual disk will be deleted at the same time. The consolidation process, however, may still continue to run for other virtual disks till the process gets completed for the second virtual disk and so on.


What is the performance impact?

The snapshot consolidation process will generate IOPS on the underlying storage array. If the process is started while the virtual machine is powered on and if the virtual machine requires intensive I/O, performance degradation may be noticed. This is because, additional read and writes are required to consolidate the delta disks to the base disk while the Guest OS continues its normal activity. If the application in use fits this description and is a critical production server, it would be advisable to start the process after-hours or during a period of low activity.


After the process is started, is it possible to stop it?

No. Once the process is started, it cannot be canceled or paused. The process has to complete before any further operations can be done on the virtual machine including power operations. Do not shut down the ESXi host during this process.

Additional Information

This article discusses only the impact to the VMware snapshot delta disk files and does not discuss the other snapshot files such as the snapshot descriptor (.vmsd) and memory snapshots (.vmsn) files. For more information, see: