This article covers unwanted file locks caused by backup applications with a proxy VM.
Errors that may be seen:
Failed to lock the file
One or more disks are busy
Unable to consolidate virtual machine snapshots due to file lock
Unable to access file since it is locked
Snapshot consolidation required
Virtual machine disks consolidation is needed
Virtual machine Consolidation Needed status
Note: For additional symptoms and log entries, see the Related Information section.
Before proceeding with transport-specific resolutions, perform the following general steps:
Chose the resolution path below that matches your backup transport mode or underlying issue.
To resolve consolidation issues caused by HotAdd transport mode, perform the following steps:
Caution: Make sure there is no backup job running on the VM that has the consolidation issue.
If the VM resides on vSAN, move the lock files to a temporary subfolder before attempting consolidation
cd into the VM namespace/folder on the datastoremkdir tmpmv .*lck tmpTo resolve this issue caused by backup with VDDK NBD/NBDSSL/SAN transport mode, terminate the hung backup process in the backup proxy.
Caution: Make sure there is no backup job running on the VM that has the consolidation issue.
VixDiskLib_Cleanup, VixDiskLib_EndAccess, etc. You might experience these additional symptoms:
vmware.log file located at /vmfs/volumes/<datastore>/<vmNameDirectory>/vmware.log you see errors similar to:vmx| ConsolidateOnlineCB: nextState = 2 uid 3
vmx| Foundry operation failed with system error: Device or resource busy (16), translated to 5
vmx| ConsolidateOnlineCB: Done with consolidateThe resource '<VMFS-UUID>' is in use.vcpu-0| Vix: [8803 mainDispatch.c:4084]: VMAutomation_ReportPowerOpFinished: statevar=3, newAppState=1881, success=1 additionalError=0
vcpu-0| Vix: [8803 vigorCommands.c:577]: VigorSnapshotManagerConsolidateCallback: snapshotErr = Failed to lock the file (5:4008)
vcpu-0| SnapshotVMXConsolidateOnlineCB: Destroying thread 6
vcpu-0| Turning off snapshot info cache.
vcpu-0| Turning off snapshot disk cache.
vcpu-0| SnapshotVMXConsolidateOnlineCB: Done with consolidatevmkernel.log file, located on the ESXi at /var/log/vmkernel.log you see entries similar to:vmkernel: gen 2141, mode 1, owner 4b94bb81-########-3bd1-########### mtime 244622]on volume '<DATASTORE_NAME>'.
vmkernel: [YYYY-MM-DDTHH:MM:SS] cpu2:4109)FS3: 2890: [Requested mode: 1] Lock [type 10c00001 offset 7505920 v 920, hb offset 3510272
vmkernel: gen 2141, mode 1, owner 4b94bb81-########-3bd1-###########mtime 244622] is not free on volume '<DATASTORE_NAME>'
vmkernel: [YYYY-MM-DDTHH:MM:SS] cpu2:4111)FS3: 2798: [Requested mode: 1] Checking liveness of lock holders [type 10c00001 offset 7313408 v 796, hb offset 3510272hostd.log file, located on the ESXi at /var/log/hostd.log you see entries similar to these during the snapshot delete process:DISKLIB-LIB : Failed to delete disk '/vmfs/volumes/4c5f4b7a-########-32ad-#########/<VMNAME>/<VMNAME>-000001.vmdk' or one of its components: Device or resource busyConsolidate virtual machine disk files <hostname> Unable to access file <unspecified filename> since it is locked
Consolidation failed for disk node 'scsi0:8': msg.fileio.lock.