Running vSphere 4
Our SAN lost power and after rebooting it, I cannot get a critical VM to start. It gets to 95% and then displays the following error dialog:
“Unable to access file since it is locked”
I created a new VM on a different SAN and pointed the hard drive to the .vmdk on the original SAN. I get the same error when trying to start the VM.
When I run this to copy the vmdk file from the old SAN to the new:
vmkfstools -i /vmfs/volumes/oldSAN/brsback/brsback-flat.vmdk /vmfs/volumes/newSAN/newbrsback/newbrsback-flat.vmdk
I get this error:
DiskLib_Check() failed for source disk Failed to lock the file (16392).
I have no backup of this VM (I know, stupid) and am hesitant to do anything to the original vmdk file.
Can someone help me clear this error so that I can start the VM on the old SAN or be able to copy it to the new SAN?
Many thanks in advance.
I typed that command and got the same error. I even rebooted the ESX server and I still get the error when trying to start the VM.
When I type this:
touch: cannot touch `/vmfs/volumes/4bad736a-3866fb82-e2a9-00221985f247/brsback/brsback-flat.vmdk': Device or resource busy
I see that the time stamp on the file keeps updating, so something is accessing it. I just don't know how to determine what it is or how to clear the lock.
vmlog shows this:
Apr 17 00:12:43.300: vmx| DISKLIB-CHAIN : "/vmfs/volumes/4bad736a-3866fb82-e2a9-00221985f247/brsback/brsback.vmdk" : failed to open (Failed to lock the file).
Apr 17 00:12:43.300: vmx| DISKLIB-LIB : Failed to open '/vmfs/volumes/4bad736a-3866fb82-e2a9-00221985f247/brsback/brsback.vmdk' with flags 0xa (Failed to lock the file).
Apr 17 00:12:43.301: vmx| DISK: Cannot open disk "/vmfs/volumes/4bad736a-3866fb82-e2a9-00221985f247/brsback/brsback.vmdk": Failed to lock the file (16392).
Apr 17 00:12:43.302: vmx| Msg_Post: Error
Apr 17 00:12:43.302: vmx| http://msg.disk.noBackEnd Cannot open the disk '/vmfs/volumes/4bad736a-3866fb82-e2a9-00221985f247/brsback/brsback.vmdk' or one of the snapshot disks it depends on.
Apr 17 00:12:43.303: vmx| http://msg.disk.configureDiskError Reason: Failed to lock the file.----
Apr 17 00:12:43.310: vmx| Module DiskEarly power on failed.
1)Check whether the you have mapped the vmdk file to some other server which is currently using it.
If so remove the vmdk file from that VM
2)Vmdk will be locked if you try to poweron the server , when some process is running on that server like cloning/snapshot when the server is in poweredoff state.So you can try this command, loginto the esx server hosting the VM
vmware-cmd \vmfs\volumes\Datastore\Servername\ServerName.vmx stop
then try to poweron the server.