Virtual Machine file lock have multiple reasons. This article covers the file lock caused by backup application proxy virtual machine.
For more information about Virtual Machine file lock, see Investigating virtual machine file locks on ESXi hosts (10051).
Symptoms:
VMware vSphere ESXi 6.x
VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x
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-0dd2dd58-3bd1-002219927983 mtime 244622]on volume 'LUN03'.
vmkernel: 12:14:41:53.816 cpu2:4109)FS3: 2890: [Requested mode: 1] Lock [type 10c00001 offset 7505920 v 920, hb offset 3510272
vmkernel: gen 2141, mode 1, owner 4b94bb81-0dd2dd58-3bd1-002219927983 mtime 244622] is not free on volume 'LUN03'
vmkernel: 12:14:41:53.832 cpu2:4111)FS3: 2798: [Requested mode: 1] Checking liveness of lock holders [type 10c00001 offset 7313408 v 796, hb offset 3510272
Consolidating/Committing snapshots in VMware ESXi
Restarting the Management agents in ESXi
Determining if a virtual disk is attached to another virtual machine
FAQ: VMware vSphere Storage APIs – Data Protection (formerly known as VMware vStorage APIs for Data Protection or VADP)
Consolidating disks associated with a backup snapshot fails with the error: The file is already in use
"An error occurred while consolidating disks:" deleting one or more snapshots or consolidate disks