VMware Communities
mhillard
VMware Employee
VMware Employee

How do I delete snapshot files?

A snapshot associated with a Workstation 7 virtual machine consumed all the available disk on my hard drive (shame on me for letting that happen!). When I went in to Snapshot Manager to delete the snapshot and merge the files together it did two things:

1. It removed the snapshot from the list in Snapshot Manager

2. Threw an error indicating I need 8.8 GB's of space to delete the snapshot (which, if I had, I wouldn't need to remove the snapshot in the first place!),

Here's the problem... because the snapshot was deleted from the list of snapshots, but the command actually failed before deleting th files, I now have "orphaned" snapshot files that are part of the virtual machine but that cannot be deleted via the Snapshot Manager. So how do I delete them?

Since the Snapshot name was removed, vmrun.exe is not option. I seem to recall there is a way to delete snapshot files from the command line when this happens, but I can't remember the command or find the process documented anywhere.

Thoughts, anyone?

Reply
0 Kudos
5 Replies
admin
Immortal
Immortal

This KB article might help you: (or maybe not). It is for VMware ESX and I see you're using Workstation.

It's still a good read.

Rick Blythe

Social Media Specialist

VMware Inc.

Message was edited by: rickblythe

Reply
0 Kudos
continuum
Immortal
Immortal

you can use vmware-vdiskmanager to consolidate the snapshot even if the vmsd file is messed up.

Post the vmx-file and a list of vmdks you still have.

You will need sufficient free disk space somewhere to do this ...

The kb that Rick mentioned is centered on ESX - for troubleshooting on Workstation read my vm-sickbay-site.






___________________________________

VMX-parameters- VMware-liveCD - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
mhillard
VMware Employee
VMware Employee

Thanks rickblythe and continuum, but after some further testing I stumbled on a solution to this problem- although it was not using the command-line like I had expected.

With the virtual machine powered-off, I opened Snapshot Manager and created another snapshot. Without ever powering the virtual machine on (so I knew the snapshot files were empty) I attempted to delete this new snapshot, but immediately received the same two results as detailed originally. Although this attempt now left me with two sets of orphaned snapshot files, it also got me thinking- why would I need 8.8 GB's of free space to delete an empty snapshot file?

So using an old USB drive I moved ~10GB's of stuff off of my hard drive so I now had the "required" 8.8 GB's of free space. Opening Snapshot Manager again, I created a third snapshot (although Snapshot Manager still only showed this one). I then immediately deleted this snapshot and, voila (and as I suspected), after a period of "cleaning up deleted files" Snapshot Manager not only deleted the most recent snapshot but also removed the snapshot files orphaned from the previous two failed attempts!

I can't say I found this documented anywhere, but the method solved my problem. I'm now back to a lean virtual machine.

Reply
0 Kudos
continuum
Immortal
Immortal

that was pure luck Smiley Wink

the safe way to do this is to use vmware-vdiskmanager




___________________________________

VMX-parameters- VMware-liveCD - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
dimitrm
Contributor
Contributor

that was pure luck

not pure luck, I got the same results

good thinking, mhillard

Reply
0 Kudos