I was trying to clone a VM in vSphere 5.0 that failed due to a "timeout error" and now I'm unable to remove the VM-flat.vmdk file from that clone within the target datastore with an error message of "An error occurred while communicating with the remote host". I need to get this VM-flat.vmdk file removed to free space back up on that datastore. Any ideas?
Thanks.
maybe the file still locked by the cloning process, have you logged in to the ESX console and see if the process still running?
If you can ssh to the server then you can
lsof | grep <*filename>
that should give the PID that locked the file
Kill <PID>
To kill the PID so you can delete the file
Try connecting directly to one of the ESXi hosts with the vSphere Client and deleting the file that way.
When I connect directly to a couple different ESXi hosts via a vSphere Client and attempt to delete the file, I receive a error "Error caused by file /vmfs/volumes/4e60c6cf-2feed90-2404-5ef3fc344abb/VM/VM-flat.vmdk".
What storage protocol and storage unit is backing the datastore?
maybe the file still locked by the cloning process, have you logged in to the ESX console and see if the process still running?
If you can ssh to the server then you can
lsof | grep <*filename>
that should give the PID that locked the file
Kill <PID>
To kill the PID so you can delete the file
Using a Dell AX150 Fibre Channel SANs.
@MartinAmaro - That was the issue. Thanks for the resolution. I can now call it a day...
I'm glad I was able to point you in the right direction.