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.
VMware vSphere ESXi
VDDK HotAdd transport mode, remove the VM disk(s) from the backup proxy VM.cd into the VM namespace/folder on the datastoremkdir locks)mv .*lck locksVixDiskLib_Cleanup, VixDiskLib_EndAccess, etc. You might experience these additional symptoms:
vmware.log, 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 'LUN03'.
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 'LUN03'
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-#########/TESTVM/TESTVM_1-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.