Determine which ESXi Host has a .vmdk file locked
I was trying to remove some dead files left over from failed P2V attempts on an ESXi 5.0 host. The question I have is which host has the file locked, I don’t want to reboot more than is necessary. I am using iSCSI targets, and this command gives you a list of which Mac address has a file locked
Therefore the offending Mac address is :00:13:72:66:E2:00
I opened my vSphere client and found the offending nic in my Configuration/Network Adapters by traversing each suspect host.
After rebooting that host, the file lock is gone.
Credit to this article from VMW http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=10051
vmkfstools –D /vmfs/volumes/<UUID>/<VMDIR>/<LOCKEDFILE.xxx>I was able to get output that had this in it:Hostname vmkernel: 17:00:38:46.977 cpu1:1033)Lock [type 10c00001 offset 13058048 v 20, hb offset 3499520 Hostname vmkernel: gen 532, mode 1, owner 45feb537-9c52009b-e812- 00137266e200 mtime 1174669462]Therefore the offending Mac address is :00:13:72:66:E2:00
I opened my vSphere client and found the offending nic in my Configuration/Network Adapters by traversing each suspect host.
After rebooting that host, the file lock is gone.
Credit to this article from VMW http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=10051
2 comments