The common mis perception of the term “snapshot”, related to VMware, can cause huge problems. I’ve spend a lot of time the last years solving snapshot problems. For once and for all, a snapshot isn’t a static situation like a clone is. A snapshot can best be compared to a redo log, although technically it isn’t because it’s just a bitmap of disk sectors that changed. When you create a snapshot you only create a small “differences” file (*.delta.vmdk) which will contain all the differences until you delete or revert. Please remember reverting(go to) doesn’t delete the differences file! And this file can grow very fast depending on how many changes are made on the disk.
Another thing that people don’t know is the way “delete all” works, but I’ve already outlined that a while ago in a blog.
When you’ve got for instance a 10 levels deep nested snapshot tree with a very large last snapshot it would almost be impossible to press delete all because it will take up a lot of disk space. It would consume a lot of time doing a “delete” for every snapshot, and still it would always take up additional diskspace.
Another way to remove the snapshot is just by cloning the VM to another Datastore. This way you don’t need the extra disk space on the same datastore, and it might be a good moment to consider re-loadbalancing your lun’s again. But for some weird reason this doesn’t always commit your snapshot. VMware just posted a nice KB article on how do the same using the vmkfstools command.
If a clone through the VMware Infrastructure 3 client did not commit the snapshots; you can try to export the disk with vmkfstools to recreate the virtual machine:
1. Run the following command to create a directory for the new disk:
[root@bs-tse-d06 RHEL5]# mkdir /vmfs/volumes/openfiler-iscsi/new_RHEL5
2. Run the following command to point vmkfstools at the last snapshot file:
[root@bs-tse-d06 RHEL5]# vmkfstools -i RHEL5-000001.vmdk /vmfs/volumes/openfiler
iscsi/new_RHEL5/new_RHEL5.vmdkDestination disk format: VMFS thick
Cloning disk ‘RHEL5-000001.vmdk’…
Clone: 3% done
[root@bs-tse-d06 RHEL5]#3. Recreate the machine. Select Use an existing virtual disk.
Rich says
Thanks Duncan.
I guess we both have snapshots on the brain these days!
http://vmetc.com/2008/06/25/search-for-vm-snapshots-from-the-service-console/