You are unable to consolidate VMware VM snapshot due to file lock.
Backup operation on the backup application fails or is interrupted.
Deleting the vmdks for some cases may fail with Device or Resource busy error.
Environment
VMware vSphere 6.x VMware vSphere 7.x
VMware vSphere 8.x
Cause
During a backup operation, the backup application creates a snapshot of the virtual machine and mounts the base disk to the backup proxy virtual machine to copy the data. When the backup is completed, the disks are mounted back to the original virtual machine and the snapshot is deleted.
This issue occurs if the backup operation fails or is interrupted. The virtual machine .vmdk files remain mounted to the backup proxy VM with a read-only lock on the vmdk files.
Resolution
To resolve this issue, remove the virtual machine disks from backup proxy virtual machine.
Right-click the backup proxy virtual machine.
Click Edit Settings.
Expand all the Hard Disk(s).
Identify the Hard Disk(s) which belong to the virtual machine that fails to consolidate.
Remove the Hard Disk(s) identified above from the proxy virtual machine by clicking on the X beside the Hard Disk to unmount Caution: Do NOT select Delete files from the datastore.
Click OK.
Return to the original virtual machine and reattempt to consolidate the snapshots.
Note: The backup proxy VM is one or more of the backup application virtual machines. If you have multiple backup proxy virtual machines, it is necessary to check all the virtual machines as the disk (.vmdk file) in question may be attached to any of them.