VMware Communities
ecp5
Contributor
Contributor

Can't delete Snapshots

I have a Windows 7 VM on Fusion 3.0, and i have a large second disk that now spans 12 VMDK's. I have deleted all the snapshots, but each time it says it can't clean up the files, so they are just hanging out there.

I need to combine all the VMDK's so I can shrink the file, but I can't seem to get any of the tips I have read on here to work. I have tried using the disktools and the VMDiskmanager to convert, but it just hangs.

Can anybody help, this is a major pain.

Tags (2)
0 Kudos
6 Replies
RaoulTLS
Contributor
Contributor

Try to shutdown VM Then delete Snapshot. If ithat's done Boot VM.

Befor You do this make a copy of the Dir incase somthing goes wrong. And you want to go back.

Vmware reports if you have snapshots that exist for a long time (esx) perhaps VM-Ware workstation also somtimes have trouble deleting them.

The sugjest turn of PC and Then Delete / cleanup then boot VM

0 Kudos
mudaltsov
Expert
Expert

Consolidating snapshots may require enough free space up to the size of the virtual disk, since it has to create a new consolidated disk before deleting existing ones. Generally after you remove the snapshots, the consolidation is supposed to happen automatically, but it may fail if there's not enough free space. Afterwards you can re-try the consolidation using the Clean Up Disk button in the Hard Disk settings.

How much free space do you have on the physical disk, and how large is the virtual disk configured to be?

You also mentioned that vdiskmanager hangs - do you remember exactly which commands you were trying to use?

0 Kudos
ecp5
Contributor
Contributor

The total VM is 121 GB. I have 185 GB currently free on the Mac disk.

Now if I go into the snapshots, there are no snapshots, but from the VM tools inside the VM I still can't shrink.

As for the diskmanager, I used the tab for Convert, and drug in the last VMDK, and tried to put in a new folder (so that is diskmanager -R I think?). It never responded, never gave me any error message, other than to say creating VMDK, but it never creates it in the folder.

0 Kudos
mudaltsov
Expert
Expert

It sounds like you have enough free space to consolidate the disks. Did you try the 'Clean Up Disk' button in hard disk settings? This will force the consolidation of disk fragments that were used by snapshots that are no longer present. Once that's done, you should be able to use the Shrink operation.

0 Kudos
rossbarkman
Contributor
Contributor

Same problem here - each time I delete a snapshot, it says "Unable to clean up deleted files" and the snapshot remains on the disk, though it no longer appears in the snapshot library. Disk Cleanup is recommended, but when I try to use it, it shows a progress bar for a few seconds and then that vanishes. It would appear that Disk Cleanup is also failing to sort out the chain of 12 snapshots.

I believe this problem began when I was forced to implement BeCrypt whole-disk encryption on my image - could that be the issue?

0 Kudos
rossbarkman
Contributor
Contributor

Just to complete the story - I was eventually able to consolidate all the snapshots using the command-line tool vmware-vdiskmanager.  However, it took me forever to get it to work due to an encoding problem on VMware's Website that had replaced a dash with an em-dash within the command in their 'how to' instructions.  When you cut & pasted it into Terminal, the em-dash looked just like a normal dash, but wasn’t recognised by the application, and the resulting error message was useless.  The correct command structure is:

cd /Library/Application\ Support/VMware\ Fusion

./vmware-vdiskmanager -r /pathtovmdkbundle/lastvmdksnapshot.vmdk -t 0 /destinationdirectory/newname.vmdk

Where pathtovmdkbundle is the full path to your existing .vmwarevm bundle, lastvmdksnapshot.vmdk is the highest-numbered snapshot in the series within that bundle, destinationdirectory is the location where you want to create the new disk image and newname.vmdk is the name of that new image.  You may need to enclose the path & file name wit quotes if they contain spaces.  E.g.:

./vmware-vdiskmanager -r "/My Virtual Machines/WIn2K.vmwarevm/Win2K-000012.vmdk" -t 0 "/My Virtual Machines/New.vmdk"

0 Kudos