VMware Communities
netlib
Enthusiast
Enthusiast

Deleting orphaned snapshot files?

Using VMWare Workstation 7. I tried deleting a couple of snapshots and got the message that there was not enough space to delete the snapshot files.  However, the Snapshots no longer appear in SnapShot Manager so I can't redo it. I have released enough space on the hard drive now. But how do I go back and delete the snapshot files that Snapshot Manager failed to delete the first time around? Hope this question is clear.  Thanks.

0 Kudos
3 Replies
a_p_
Leadership
Leadership

If there's enough free disk space , I'd suggest you clone the current virtual disk and - once done - replace the current virtual disk by the cloned disk in the VM's properties. To clone the virtual disk from the command line use:

vmware-vdiskmanager.exe -r sourceDisk.vmdk -t x destinationDisk.vmdk

where "sourceDisk.vmdk" it the latest snapshot file (the one mentioned in the .vmx file).

Depending on the current disk format, select the appropriate disk type with the "-t x" option:

Disk types:
    0                   : single growable virtual disk
    1                   : growable virtual disk split in 2GB files
    2                   : preallocated virtual disk
    3                   : preallocated virtual disk split in 2GB files
    4                   : preallocated ESX-type virtual disk
    5                   : compressed disk optimized for streaming
    6                   : thin provisioned virtual disk - ESX 3.x and above

for further details run vmware-vdiskmanager.exe /? from the command line. The command is located in the installation older for VMware Workstation.

André

0 Kudos
netlib
Enthusiast
Enthusiast

Oh boy. Sounds like a really labor-intensive way of doing it. So if there was not enough space to delete the snapshots when first attempted, those files will remain forever? There really should be a way of resuming the task once space is cleared up.  This has happened to me several times and I would guess there is probably many GB of lost space on my hard drive from orphaned snapshots.

0 Kudos
a_p_
Leadership
Leadership

So if there was not enough space to delete the snapshots when first attempted, those files will remain forever?

Most likely yes. An out-of-disk-space error is something, most applications don't expect and therefore may behave "incorrect". Anyway there are usually no "orphaned" snapshot files. If the snapshot deletion process fails, the snapshots should remain in use. You can see which of the .vmdk files are in use by looking at the VM's vmware.log file.

There really should be a way of resuming the task once space is cleared up

I agree. With ESXi 5.0 an option to "Consolidate" snapshots was added. Maybe we will see something like this in VMware Workstation too in a future version. In the meantime you'll have to consolidate the snapshots manually by cloning the virtual disk as mentioned before.

André

0 Kudos