I was copying a VM between datastores last night when I looked away and then the vCenter host started restarting due to Windows update... The VM transfer between was aborted, but now the VMDK file it was transferring is locked and I can't start the virtual machine.
The Knowledge base articles I've found are too cryptic, I just need to get the vmdk unlocked... How?
vCenter / ESXi 5.0
Error: "Unable to access file [NEXSAN_SAS] rds-sv-ent/rds-sv-ent_1.vmdk since it is locked"
More Details: "An unexpected error was received from the ESX host while powering on VM vm-261. Reason: Failed to lock the file. Cannot open the disk '/vmfs/volumes/4f4bb0fe-f7daabec-6a41-ac162d73a349/rds-sv-ent/rds-sv-ent_1.vmdk' or one of the snapshot disks it depends on. "
I lucked out in the case. Upon writing this, the main disk was locked. I removed the VM from inventory and readded it - no good. I vMotioned the VM between hosts and noticed now the main vmdk (OS Drive) wasn't locked, but the ancillary swap drive. I disconnected that and started the VM - good to go. Powered down the VM, reattached the swap drive, 100% ok.
These two sites were very helpful:
http://technotes.khitrenovich.com/deployment-vm-template-fails-vmdk-locked-error/
http://www.resole.nl/vmware-ultimate-guide-powering-on-a-virtual-machine-unable-to-access-a-file-since-it-is-locked-with-raw-device-mappings-for-windows-clustering/
I'm sure this document should be allow you to work through and unlock the file:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=10051
I'd normally copy and paste relevant parts, but it's a substantial process to go through and diagnose what the issue is and unlock the file.