As I am testing several third party backup tools, this morning I stumbled upon a failed backup. No snapshot present on the VM which could not be backed up – but a yellow mention in the VI client: “Configuration Issues – Virtual Machine disks consolidation is needed“. And my luck was, that selecting “consolidate” ended in that one brilliant error: Unable to access file
since it is locked. Great. Here’s what was wrong!
So what is causing this “needs consolidation” warning? Looking at VMware KB Article 2003638, a need for consolidation is now visible (the need has always been there 😉 ). When this warning pops up, the snapshot is already removed from the VM, but the snapshot files could not be consolidated back into the base disk.
How can you find out if any of your VMs needs snapshots to be consolidated? You can simply add the “consolidation” tab to the VI client, find any VMs that require consolidation and kick it off:
Of course, consolidating the snapshot did not work in my case. Lucky me, I got this error:
So why is this occuring? A little history: As I was testing a third party solution of “Brand X”, this error occured. I will not go into details which backup product this was though 🙂
So the backup solution of Brand X was trying to backup a VM. A VMware-level snapshot was made, the base disk was hot-added to the VM that handles the backup. Then the backup was made.
After the backup was made however, the backup solution somehow did not manage to hot-remove the disks from the backup VM. This meant the base disks of the VM being backed up where still locked, hence the failure when trying to consolidate.
How it was fixed
The solution was, as it is most of the time, simple: I manually removed the base disks from the backup VM (without deleting them from disk of course!), then I retried the consolidation. This time: success!
All’s well that ends well!