Unable to access file since it is locked filePath: /vmfs/volumes/datastore_name/vm_name/vm_name-flat.vmdk host:hostname,host_ip mac: ['##:##:##:##:##:##'] id: ##### worldName: vmx lockMode: Read-OnlyVMware vCenter Server 8.x
VMware vSphere ESXi 8.x
This condition occurs when a data protection application (such as a backup or replication tool) fails to release the lock on the virtual machines virtual disk file if a backup job is abruptly interrupted, stalls, or fails to complete its exit routine.
To successfully complete the disk consolidation task, the external lock on the VMDK file must be released. Follow these steps to resolve the issue:
Identify the stale backup job for the affected virtual machine in the backup appliance and cancel it.
Right-click the affected virtual machine > Edit Settings ‘X’ next to the associated disk(s).Delete files from datastore”Monitor for automatic consolidation of the virtual machine disk, or manually consolidate the disks.