Virtual machine snapshot consolidation may fail in environments utilizing third-party backup solutions (such as Veeam, CommVault, or Cohesity). The snapshot consolidation task fails in the vSphere interface with one of the following error messages:
"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.
Note: Before proceeding, ensure no backup jobs are currently running on the affected VM.
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.
Special note for vSAN environments: If the VM resides on vSAN, move the lock files to a temporary subfolder before attempting consolidation
rootmkdir 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 3vmx| Foundry operation failed with system error: Device or resource busy (16), translated to 5vmx| ConsolidateOnlineCB: Done with consolidateThe resource '<VMFS-UUID>' is in use./vmfs/volumes/<datastore>/<vmNameDirectory>/vmware.log file:vcpu-0| Vix: [8803 mainDispatch.c:4084]: VMAutomation_ReportPowerOpFinished: statevar=3, newAppState=1881, success=1 additionalError=0vcpu-0| Vix: [8803 vigorCommands.c:577]: VigorSnapshotManagerConsolidateCallback: snapshotErr = Failed to lock the file (5:4008)vcpu-0| SnapshotVMXConsolidateOnlineCB: Destroying thread 6vcpu-0| Turning off snapshot info cache.vcpu-0| Turning off snapshot disk cache.vcpu-0| SnapshotVMXConsolidateOnlineCB: Done with consolidate/var/run/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 3510272vmkernel: 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 3510272/var/run/log/hostd.log file, 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 lockedConsolidation failed for disk node 'scsi0:8': msg.fileio.lock.