Snapshot Consolidation needed – Which with my luck… fails

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!




Root cause

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:




What went wrong in my case?

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!

5 Responses to “Snapshot Consolidation needed – Which with my luck… fails”

  • Dude thank you. That error was making m mental!! I found you through Google and bingo my system is back. Mind you that this VM is my 5.1 vCenter server so that added a little more stress. The up side is it’s only a lab environment.

    Thank you again and happy holidays!

  • Ben Greslick says:

    Storage VMotion to another datastore. The delta files follow the directory, but now you can successfully Snapshot -> Consolidate, and the delta files will go away.

    Note: We could not see the snapshots in the snapshot manager. Running ESXi 5.0u1.

  • Bonnie Bauder says:

    Thank you! This post saved me a lot of time!

  • Allan says:

    Erik,

    So you shut down the server first, manually removed the base disks (backup disks), ran the consolidate, added back the original server vmdk disk files and fired the server back up?

    I wanted to make sure that is how you did it before I proceed.

    Thanks!

    • Actually in my case there was no ESXi reboot required at all. The base disk was simply still connected to the backup proxy VM, and for that reason the base disk was locked aka the snapshot could not be consolidated (as the base disk was locked). Removing the base disk from the backup appliance VM was enough to remove the lock, after which consolidation was possible, and problem solved.

Leave a Reply

*

Soon to come
VMdamentals Tag Cloud
DutchEnglishFrenchGermanItalianSpanish
Blogroll
Links
Archives