All LessonsVirtualization

How to Fix Virtual Machine disks consolidation is needed error easily

Warning ‘Virtual Machine disks consolidation is needed’ on the Virtual tab of the virtual machine in the VMWare vSphere console means that deleting the snapshot (Delete or Delete All operation) did not delete correctly (left on the disk) the virtual vmdk files of the snapshots or logs. As a result, the virtual machine cannot be backed up.

The most common causes of the “Virtual Machine disks consolidation is needed” error are:

  • Poor performance of disk storage, due to which deletion / consolidation of snapshots fall off by timeout or large snapshot size;
  • There is not enough storage space on VMFS to perform consolidation;
  • A vSphere or third-party application (usually a backup application, HP DataPtotector, Veeam, or Netapp VSC) has blocked snapshots files. Make sure there are no running virtual machine backup processes;
  • Connection loss problems (possibly temporary) between the vCenter servers and the ESXi host;
  • To correct the error “Virtual machine Consolidation Needed status“, right click on the virtual machine and select VM -> Snapshots -> Consolidate in the menu.

A window will appear asking:

This operation consolidates all redundant redo logs on your virtual machine

 

Confirm the removal of excess logs. After that, vCenter will consolidate the disks and clear the logs. The consolidation process may take several minutes, during which the performance of the VM may deteriorate.

start consolidating vmware virtual disks

 

After that, the warning about the need to consolidate the VM will disappear.

In some cases, when performing consolidation in the vSphere console, an error may appear:

See also : Useful commands VMWare ESXi

VMware recommends that you restart the Management agents on the ESXi server. To do this, you need to connect to the host via SSH and execute the command:

services.sh restart

 

How to Fix Virtual Machine disks consolidation

However, you can try to unlock the virtual machine files like this:

Shut down the virtual machine (if possible);

  • Create a new snapshot;
  • Delete VM snapshots with the help of the “Delete All” item;
  • Move the VM to another ESXi using vMoteion;


Try to consolidate snapshots as stated above.You can find all the virtual machines that need to be consolidated using PowerCLI. To do this, connect to your vCenter server:

Connect-VIServer vsphere.compspice.com

Now we will get a list of all VMs with the status “Virtual machine disks consolidation is needed”:

Get-VM | Where-Object {$ _. Extensiondata.Runtime.ConsolidationNeeded}

Now you can consolidate the disks of all received machines:

Get-VM | Where-Object {$ . Extensiondata.Runtime.ConsolidationNeeded} | foreach {$ . ExtensionData.ConsolidateVMDisks_Task ()}

Snapshots -> Consolidate virtual machine snapshots consolidation

 

 

Related Articles

Back to top button