Unable to power on the VM with error: Unable to access file /vmfs/volumes/UUID/vmName/vmname-flat.vmdk since it is locked
search cancel

Unable to power on the VM with error: Unable to access file /vmfs/volumes/UUID/vmName/vmname-flat.vmdk since it is locked

book

Article ID: 435036

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

VM fails to power on with the following error:

Unable to access file /vmfs/volumes/DatastoreUUID/vmName/vmname-flat.vmdk since it is locked KB 2107795 filePath: /vmfs/volumes/DatastoreUUID/vmName/vmname-flat.vmdk host: HostFQDN,###.###.###.### mac: ['##:##:####:##:##'] id: ######## worldName: vmx lockMode: Exclusive

The MAC address points to one of the ESXi hosts in the environment.

The VM is part of a database cluster of VMs and the VMs were recently moved to a new environment and the drives were re-attached. The VMs have a combination of RDM and non-shared (Dependent) drives.

Environment

vSphere 8.0.3

Cause

One of the non-shared drives is attached to both VMs. One VM is  powered on. The other VM will not power on because the host locks the file on the powered on VM since it is a non-shared (Dependent) drive. The drive is not designed to be shared. The lock prevents usage of the drive on another VM to prevent data corruption.   

Resolution

On the VM that will not power on, perform the following steps:

  1. Right click on the VM go to edit settings.
  2. Verify that the VM has its own vmdk files for the non-shared disks.
  3. Verify that there are vmdk files from other VMs attached to it.
  4. On the right side of the hard drive line click on the three dots, See Deleting a vmdk file for a virtual machine that is no longer used fails: Device or resource busy
  5. Select "Remove Device" (Do not select "Remove device and data").
  6. Repeat the process for any additional VMDK files not owned by the VM.
  7. Click OK.