VMware Cloud Community
eagleh
Enthusiast
Enthusiast
Jump to solution

Cannot delete a vmdk file from a vmfs storage, help!

Hi there,

I have destroyed a vm but there is a vmdk file (i.e. vm3-flat.vmdk) in the folder I couldn't delete. I tried VIClient and Putty, no luck. Any idea? Thanks in advance.

If you found this information useful, please kindly consider awarding points for "Correct" or "Helpful". Thanks!
Tags (4)
Reply
0 Kudos
1 Solution

Accepted Solutions
woodwarp
Enthusiast
Enthusiast
Jump to solution

Try using rvtools to check that the file is indeed an orphaned vmdk and there isn't any other VM using that file.

View solution in original post

Reply
0 Kudos
10 Replies
MauroBonder
VMware Employee
VMware Employee
Jump to solution

Even after running "service mgmt-vmware

restart" on all the esx hosts, I am still unable to delete the virtual

disk file. The original machine has been destroyed and am trying to free

up space by deleting this file from the data store. There were no

snapshots of this volume. Trying to avoid restarting the entire host

*If you found this information useful, please consider awarding points for "Correct" or "Helpful"*

*Please, don't forget the awarding points for "helpful" and/or "correct" answers. *Por favor, não esqueça de atribuir os pontos se a resposta foi útil ou resolveu o problema.* Thank you/Obrigado
Reply
0 Kudos
mittim12
Immortal
Immortal
Jump to solution

You might be able to use this KB article to see if the file is locked by one of the ESX host.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=10051






If you found this or any other post helpful please consider the use of the Helpful/Correct buttons to award points

Reply
0 Kudos
eagleh
Enthusiast
Enthusiast
Jump to solution

Tried the KB above. The single file seems somehow orphaned. Restarting ESX hosts will be my last option. Thank you.

If you found this information useful, please kindly consider awarding points for "Correct" or "Helpful". Thanks!
Reply
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

and you have restarted the management agents on the host in which the VM was once registered?

service mgmt-vmware restart

Reply
0 Kudos
eagleh
Enthusiast
Enthusiast
Jump to solution

Okay, just did on both hosts. No love.

If you found this information useful, please kindly consider awarding points for "Correct" or "Helpful". Thanks!
Reply
0 Kudos
sabya1232003
Enthusiast
Enthusiast
Jump to solution

If there is no risk involved please try to rescan the LUN where the file resides in (Datastore) and after that run the service mgmt-vmware restart .Hopefully the file locking would be disabled and it can the deleted futher.

Another experiment can be done by creating a new VM and mounting this vmdk as existing disk.then remove the VM alongwith the Datafiles.

woodwarp
Enthusiast
Enthusiast
Jump to solution

Try using rvtools to check that the file is indeed an orphaned vmdk and there isn't any other VM using that file.

Reply
0 Kudos
eagleh
Enthusiast
Enthusiast
Jump to solution

One of my colleagues generated this vm improperly. Found out this vmdk was NOT really orphanned. Problem solved.

Thank to RVTOOLS. Thank you. Woodwarp.

If you found this information useful, please kindly consider awarding points for "Correct" or "Helpful". Thanks!
Reply
0 Kudos
habibalby
Hot Shot
Hot Shot
Jump to solution

Hello,

I'm in the same Dilemma as yours:) How did you solve this issue?

I have tried rebooting the three hosts, but still I'm unable to delete the flat.vmdk file. RvTools cannot list the VM as there is no vmx file and the VM is not registered in the Inventory.

Best Regards,

Hussain Al Sayed

Revisit your posts and award points for "correct" or "helpful".

Best Regards, Hussain Al Sayed Consider awarding points for "correct" or "helpful".
Reply
0 Kudos
habibalby
Hot Shot
Hot Shot
Jump to solution

Hello Once Again,

I have tried all the possible way to get rid of the flat.vmdk file with no luck, the only way that solved this issue is to Hot Storage vMotion the remaining VMs on that Store once all of them removed, I have deleted the LUN directly for the EMC CX storage:), rescan all the ESXs hosts to make sure that this LUN doesn't show in the ESX.

Best Regards,

Hussain Al Sayed

Revisit your posts and award points for "correct" or "helpful".

Best Regards, Hussain Al Sayed Consider awarding points for "correct" or "helpful".
Reply
0 Kudos