VMware Cloud Community
Darin
Contributor
Contributor

Cant delete snapshots

All,

We had a VM running under ESX 3 that had about 20 snapshots on it and we have now removed the server through the VI client tool. The problem is that the VM snapshot delta files still remain and I cant delete them. If I log into one of the ESX servers and navigate to the filestore (VMFS3 formatted LUN on a SAN), when I attemtp to delete the files I get the following message -

rm: cannot remove `sernt47-000003-delta.vmdk': Device or resource busy

There are about 23 of these files at about 15 - 20 Gb each.

Any ideas anyone?

Thanks,

Darin

0 Kudos
8 Replies
virtech
Expert
Expert

Are you sure these files are not being used by another VM ?

0 Kudos
jdaunt
Enthusiast
Enthusiast

If the VM configuration files still exist for this VM (my understanding is you deleted this virtual machine, but the snapshot files still exist), you can try typing "vmware-cmd /vmfs/volumes/vmfsvolumename/vmname/vmname.vmx removesnapshots" and see if that works.

0 Kudos
Darin
Contributor
Contributor

Hi,

Yes, I'm certain that no other VM is using these files and unfortunately the VMX file has already been deleted.

Thanks

0 Kudos
admin
Immortal
Immortal

So you don't want the data contained in these snapshot files anymore? I'm guessing from the fact that you've deleted the .vmx, you don't want the VM at all?

If that's the case, then run the following at the service console of the host that was running the VM, as root.

ps aux | grep sernt47[/code]

From that find the process number of the process that is locking the files and run the following, where is the process number.

kill -9 [/code]

You should then be able to delete the files using rm.

0 Kudos
Darin
Contributor
Contributor

Hi,

Yep, tried that (on all the SAN connected Vmware hosts) but there were no processes to kill.

Thanks,

0 Kudos
admin
Immortal
Immortal

Well something must be locking the files open!

Does lsof show anything?

0 Kudos
Darin
Contributor
Contributor

I agree with you!

lsof shows that the files are not in use.

As you can see I am really stumped.

0 Kudos
spex
Expert
Expert

Darin,

some thought's:

Do you have mounted the volumes also at an other vm?

Did you try to delete the snapshots before you removed the vm?

Maybe the process for writing snapshot data to the base volume is still on going....

Regards

Spex

0 Kudos