VMware Communities
MoRRiS1
Contributor
Contributor

Error cleaning up virtual machines in Fusion

Hi,

I have a problem with several Virtual Machines in Fusion 11 when trying to do a 'clean up virtual machine' as suggested by Fusion.

The error message is:

"An error occurred while consolidating disks: Directory not empty."

I don't know what to do, or how to fix it.

The machine had several snapshots, And one by one I deleted them, but after every delete of a snapshot in the GUI, the same error message came up.

Those snapshots are not visible in the GUI anymore, but the vmdk files still have several snapshot files in the .vmware package folder.

How can I 'repair' this, and what is going wrong?

Tnx!

0 Kudos
7 Replies
philcruz
Contributor
Contributor

I'm having the same issue.

0 Kudos
wila
Immortal
Immortal

Hi,

Try creating a new snapshot, followed by deleting it again.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
echapa
Contributor
Contributor

I'm also having the same issue. It's a macOS guest VM. Can't perform clean-up after deleting snapshots. Have tried creating and deleting a snapshot as the last post suggested, didn't work.

0 Kudos
wila
Immortal
Immortal

Hi,

If that doesn't work and you still have orphan snapshot files laying around then the easiest solution is to take a full clone of your VM.

There are other ways with manually inspecting the disk files and disk file descriptors, but taking a full clone (NOT a linked clone) is the next best thing to get a new VM without the orphaned snapshot files.

To create a full clone, shut down the VM if it is running and then right click on your VM in the VM library and select "Create Full Clone".

This will then create an exact copy of your existing VM, but with a new name "clone of <vmname>".

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
echapa
Contributor
Contributor

Thanks @wila,

Creating the "Full Clone" worked, but it didn't clone the non-orphaned snapshots. Is there a way to copy/transfer those over from the original VM? Otherwise I think I'm going to have to keep the original VM because of those non-orphaned snapshots.

0 Kudos
wila
Immortal
Immortal

Hi,

Yes a clone consolidates the VM, it does not transfer the snapshots to the cloned VM.

There is a way to get rid of only the orphaned snapshot files, but you will have to promise me to make a backup of your complete VM to an external disk before we do that.

Yes I know what I am doing, no I do not want any mistakes to cause you to loose any data (even if it is just a snapshot) and any manual interventions with VMs are best done with extra precautions.

To make a backup of your VM, shut it down (not suspend) and close VMware Fusion, then copy the whole VM bundle to an external disk. (of course you can also use my VM backup software Vimalin, but my guess is that you haven't installed that Smiley Happy )

After the backup is complete you can then attach the following files from the VM to your reply here:

- the .vmx file

- all of the .vmdk files smaller than or equal to 2kB

- the .vmsd file

- the vmware.log file(s)

a listing of all the files in your VM is also required ( ls -alh /your/VM > ~/Desktop/vmfiles.txt )

If you need more detailed steps then do let me know.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
cdeliens
Contributor
Contributor

I'm not sure I've seen such a solution here, so I'm going to share what worked for me. Please make sure to have a copy/backup of your VM before doing the following steps:

  1. CTRL+Click on the VM file;
  2. Select "Show Package Contents";
  3. Delete folders with the ".lck" suffix.

Give it another GO in Fusion, and it should boot just fine.

The ".lck" folders contain lock files, which Fusion uses to store various running VM states. For example, it could be that the VM didn't properly shut down, or Fusion could not get rid of the lock files before you tried to copy/move the VM to another location/device (which was my case).

Hope this helps! 🙂