Virtual machine disk(s) need consolidation 0

While helping a customer share a set of RDMs between two different virtual machines, I ran across an interesting notice that I had not seen before in previous versions of vSphere.

After setting up the RDMs on the first virtual machine without issue, I went to add the existing virtual disks to the second virtual machine when I noticed a “Virtual Disk Consolidation Needed” warning on the top of the summary screen.

This notice prevented me from successfully enabling SCSI bus sharing between the two virtual machines.  As it turns out, there is a very nice VMware KB article on this issue (found here).

To summarize, whenever you delete a snapshot or series of snapshots, the snapshot files are consolidated and merged to another snapshot file or to the virtual machine parent disk.  If this consolidation fails, no snapshots are shown in the snapshot manager GUI, however, they are still in use behind the scenes.

To fix this issue, VMware recommends the following steps:

  1. To consolidate the snapshot files, right-click the virtual machine and choose Snapshot > Consolidate.
  2. Check the Need Consolidation column to verify that the task succeeded.

In my case, I received an error stating that the files were locked, causing a failure of the consolidation process.  Due to the fact that I was under a time crunch to get this resolved, I decided to think outside the box to get this virtual machine up and running again quickly.  Instead of deep-diving into the esxcli utility to diagnose this issue further, I simply cloned the virtual machine (effectively removing all snapshots and file locks in the process).  After cloning the virtual machine I was able to easily add the existing virtual disks and enable physical bus sharing on the SCSI controller.

Once I was sure everything was again working properly, I deleted the original virtual machine.

In hindsight, I wish that I had more time to dive in and diagnose what was really going on with the original virtual machine to satisfy my inner curiosity.  I have not been able to replicate the failed snapshot consolidation in my lab.