VMware Cloud Community
A25Simon
Contributor
Contributor

Can i delete the <vm>-<number>.vmdk and <vm>-<number>-delta.vmdk snapshot files

Can i delete the <vm>-<number>.vmdk and <vm>-<number>-delta.vmdk snapshot files to clear out old snapshots in the VMFS datastore containing the VM ?

Will directly deleting the files from the datastore cause any issue to the VM? or VM disk size?

Tags (3)
0 Kudos
8 Replies
a_p_
Leadership
Leadership

Will directly deleting the files from the datastore cause any issue to the VM?

Manually deleting any of these files will destroy your virtual machine. With VMware products, snapshots work as a chain of files. Deleting just 1 chain link will render any newer snapshots useless. The only way to safely delete snapshots is by using the Snapshot Manager.

see http://kb.vmware.com/kb/1015180

André

0 Kudos
A25Simon
Contributor
Contributor

The problem is these files are not visible onthe snapshot manager.... i cant create new snaphots with the error - snapshot already exists... so when i checked the datastore - there were so many snaphot.vmsn files and one <vm>-<0000002>.vmdk and another flat file - <vm>-<0000001>-delta.vmdk

0 Kudos
a_p_
Leadership
Leadership

Actually the delta file should not even show up in the datastore browser!? Please provide a list of all the files in the datastore (showing all file details!), if possible by using putty and running ls -lisa. In addition to this file list post/attach the latest vmware.log from the VM's datastore folder.

André

0 Kudos
A25Simon
Contributor
Contributor

Attached is the file list inside VM folder.

---------------

0 Kudos
a_p_
Leadership
Leadership

Is or has this VM been configured for Fault Tolerance (shared.vmft)?

Anyway, please provide the VM's latest vmware.log for this VM to see whether the delta.vmdk file is still in use.

André

0 Kudos
A25Simon
Contributor
Contributor

Attached is the latest vmware.log

0 Kudos
a_p_
Leadership
Leadership

Assuming the VM is currently not configured for FT I'd suggest you do the following:

  • shutdown off the VM
  • create a sub-folder in the VM's directory on the datastore
  • move all .vmsn files to the sub-folder
  • move the shared.vmft file to the sub-folder
  • move "ORT Test Wintel-000001-delta.vmdk" to the sub-folder
  • power on the VM
  • if successful, create a new snapshot and then click the "Delete All" button in the Snapshot Manager to get rid of all snapshots

Once everything works as expected you can safely delete the sub-folder.

André

0 Kudos
notRoman
Enthusiast
Enthusiast

My understanding is that the vmname.vmx file tells you what .vmdk files are in use.

On my system, Netbackup always creates a snapshot when doing backups, then integrates it back into the flat file and then frequently errors out leaving the delta.vmdk, ctk.vmdk, and .vmdk files. Sometimes I can't get any more snapshots until I clear these out. Sometimes snapshots seem to work, but new snapshot files continue to accumulate. There are many variations of snapshot files not being handled correctly by ESXi and/or third party utilities. Following is one scenario that is fixable:

I run: cat *.vmx | grep vmdk to get the entries in the vmx file relating to vmdk files. If I only see vmname.vmdk (and maybe vmname_1.vmdk if I have a second drive) then I know all the extra -000001.vmdk (or 2,3,4 however many errant snapshots managed to get stuck -- had 260 once which destroyed a VM altogether) files are junk and can be deleted. If you are unsure, then just try to move them to a temporary file and delete later once you are satisfied that they are not in use. I assume that if the file is in use and the VM is running, it won't let me delete it anyway, but haven't tested that. If this happens, there is nothing you can do from any graphical user interface. You must delete these files from SSH or something like that.

0 Kudos