Clustered VM fails to power on after adding shared disk (“Failed to lock the file”)
book
Article ID: 391638
calendar_today
Updated On:
Products
VMware vCenter ServerVMware vSphere ESXi
Issue/Introduction
Symptoms:
After performing a Storage vMotion of a clustered VMDK or RDM, the VM fails to power on.
After re-adding shared disks to the secondary VM, powering on the VM gives the below error:
"Failed to lock the file: Cannot open the disk '/vmfs/volumes/<vm file path>.vmdk' or one of the snapshot disks it depends on".
Also,
Unable to access file since it is locked&#10;KB 2107795&#10;filePath: &#10;host: &#10;mac: &#10;id: NA&#10;worldName: NA&#10;lockMode:
The /vmfs/volume/<datastore>/<vm_folder>/vmware.log for the VM has the below errors:
Power on failure messages: "Failed to lock the file" "Cannot open the disk"
Environment
VMware vSphere 7.x
VMware vSphere 8.x
Cause
Since these VMs use shared disks, the disk sharing setting should be set to Multi-Writer and the disk mode should be Independent-Persistent.
If the disk sharing setting is set to No Sharing or Unspecified, the VM will not be able to access and lock the shared VMDK properly, causing the power-on operation to fail.
Resolution
To resolve this issue, reconfigure the disk sharing settings to allow multi-writer access.
Power off the virtual machine.
Right-click the VM and select Edit Settings.
Expand the affected Hard Disk.
Change the Sharing drop-down to Multi-writer.
Verify the Disk Mode is set to Independent-persistent.
Click OK and power on the virtual machine.
Additional Information
Verify that the VMDK attached to the secondary VM is the intended shared disk and is not associated with another virtual machine or a different datastore.