While the system can technically create up to 254 snapshots for one virtual disk, VMware only supports up to 32 snapshots in a linear sequence (a single branch). To understand what we mean by a 'single branch', consider this example of a snapshot tree:
Base VM Virtual Disk
│
├── Snapshot 1
│ │
│ ├── Snapshot 2
│ │ │
│ │ ├── Snapshot 3
│ │ │ │
│ │ │ ├── Snapshot 4
│ │ │ │ │
│ │ │ │ └── Snapshot 5 <-- This is one branch with 5 snapshots
│ │ │ │
│ │ │ └── Alternative Snapshot Path 1
│ │ │
│ │ └── Alternative Snapshot Path 2
│ │
│ └── Alternative Snapshot Path 3
In this example, the path from Base VM through Snapshot 1, 2, 3, 4, and 5 represents a single branch. The vCenter and ESXi operating systems are designed to handle up to 32 snapshots in such a linear sequence for optimal performance and stability. While you may see other branches form (shown as Alternative Paths in the diagram), the 32-snapshot limit applies to any single path from the Base VM to the end of a branch.
The vCenter and ESXi operating systems therefore aren't designed to handle more than 32 snapshots in one branch.
ctkEnabledFALSEvim-cmd vmsvc/getallvms |grep <vm_name>vim-cmd vmsvc/getallvms |grep testvm117 testvm1 [datastore1] testvm1/testvm1.vmx windows8Server64Guest vmx-13esxcli storage filesystem list |grep <datastore name>esxcli storage filesystem list |grep datastore1/vmfs/volumes/abcxxxxxx-xxxxxxxx datastore1 abcxxxxxx-xxxxxxxx true NFS 347967913943040 258073703899136cd /vmfs/volumes/abcxxxxxx-xxxxxxxx/testvm1ls -l -rw------- 1 root root 369 Jan 31 14:12 testvm1-000240.vmdk -rw------- 1 root root 64424509440 Jan 31 14:12 testvm1-000240-delta.vmdk -rw------- 1 root root 635 Jan 31 14:12 testvm1.vmdkvmkfstools -i "<path to VM><highest snapshot number>" "path to VM><vm name>_consolidated.vmdk" -d thinvmkfstools -i "/vmfs/volumes/abcxxxxxx-xxxxxxxx/testvm1/testvm1-000240.vmdk" "/vmfs/volumes/abcxxxxxx-xxxxxxxx/testvm1/testvm1_consolidated.vmdk" -d thin
cp <vmx file name> <vmx file name>.bakcp testvm1.vmx testvm1.vmx.bakvi testvm1.vmx# Find disk reference to the file you used in the consolidation command (press / then type): /testvm1-000240.vmdk# Where you find the the file change line from:scsi0:0.fileName = "testvm1-000240.vmdk"# To:scsi0:0.fileName = "testvm1_consolidated.vmdk"# Save and exit (press ESC, then type)::wq
Validation Testing:
If Initial Consolidation Fails with below error then rerun the command with -v100 to get more details on why the process is failing.
Failed to open '/vmfs/volumes/Datastore/VM_Name/VM_Name-000254.vmdk': The parent of this virtual disk could not be opened (23). [root@esx004:/vmfs/volumes/Datastore/VM_Name]
If you see error "Too many open files" in the output stack then you will need to do an incremental consolidation.
vmkfstools -i "/vmfs/volumes/abcxxxxxx-xxxxxxxx/testvm1/testvm1-000030.vmdk" "/vmfs/volumes/abcxxxxxx-xxxxxxxx/testvm1/testvm1_consolidated30.vmdk" -d thinvi testvm1-000031.vmdk # Disk DescriptorFile version=1 encoding="UTF-8" CID=4b1240c1 parentCID=4b1240c1 createType="seSparse" parentFileNameHint="testvm1-000030.vmdk" # Disk DescriptorFile version=1 encoding="UTF-8" CID=4b1240c1 parentCID=ffffffff createType="seSparse" parentFileNameHint="testvm1_consolidated30.vmdk"vmkfstools -i "/vmfs/volumes/abcxxxxxx-xxxxxxxx/testvm1/testvm1-000060.vmdk" "/vmfs/volumes/abcxxxxxx-xxxxxxxx/testvm1/testvm1_consolidated60.vmdk" -d thinvi testvm1-000061.vmdk