1 person found this helpful
The error, Failed to lock the file means that another process is opening the file and the process you are using cannot open the file properly.
The error, The file specified is not a virtual disk can occur if the file you are pointing at is not a virtual machine.
To resolve this issue, remove the disk from the virtual machine and re-add it. When you re-add it, you can use the datastore browser to locate the disk on one of your datastores.
Please find the below KB article for more details.
File is locked with some other process or with another ESX host. While powering ON , VM migrated to another host but old host didn't release the lock.
check vmkernel.log to find any lock on previous host.