Virtual Machine file locks have many origins. This article covers unwanted file locks caused by backup applications with a proxy VM.
Potential Symptoms:
Failed to lock the file
or
One or more disks are busy
or
Unable to consolidate virtual machine snapshots due to file lock
or
Unable to access file since it is locked
Snapshot consolidation required
or
Virtual machine disks consolidation is needed
or
Virtual machine Consolidation Needed status
Note: For additional symptoms and log entries, see the Related Information section.
This issue occurs if:
1. Investigate locks to locate the 3rd party backup solution's proxy VM with the disk attached: Investigating virtual machine file locks on ESXi hosts
2. To resolve this issue caused by backup with VDDK HotAdd transport mode, remove the VM disk(s) from the backup proxy VM.
Caution: Make sure there is no backup job running on the VM that has the consolidation issue.
3. To resolve this issue caused by backup with VDDK NBD/NBDSSL/SAN transport mode, kill the specific backup process in the backup proxy.
Caution: Make sure there is no backup job running on the VM that has the consolidation issue.
4. To resolve this issue caused by the wrong backup workflow of 3rd party backup solutions, backup vendors should implement proper failure cleanup.
VixDiskLib_Cleanup, VixDiskLib_EndAccess, etc. You might experience these additional symptoms:
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 consolidate
The resource '<VMFS-UUID>' is in use.
vmkernel: gen 2141, mode 1, owner 4b94bb81-XXXXXXXX-3bd1-XXXXXXXXXXX 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-XXXXXXXX-3bd1-XXXXXXXXXXX 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 3510272