Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Virtualization / VMWare / VMWare: Virtual Machine Disks Consolidation is Needed

July 17, 2019 PowerShellVMWare

VMWare: Virtual Machine Disks Consolidation is Needed

The warning ‘Virtual Machine disks consolidation is needed’ in the Summary tab of a virtual machine in the VMware vSphere console means that when deleting a snapshot (using the option Delete or Delete All), the snapshot VMDK files or logs have not been deleted correctly (remain on the storage). This causes a virtual machine backup errors.

vmware warning: Virtual Machine disks consolidation is needed’

The most typical causes of the ‘Virtual Machine disks consolidation is needed’ error are:

  1. Poor storage performance, due to which snapshots cannot be deleted/consolidated due to a timeout or a large size of a snapshot;
  2. There is not enough space on the VMFS store to perform consolidation;
  3. vSphere or a third-party app (as a rule, it is a backup application, like HP DataPtotector, Veeam or Netapp VSC) has locked snapshot files. Make sure that there are no running processes of a virtual machine backup;
  4. Connection problems (possibly temporary) between the vCenter server and the ESXi host.

To fix the error ‘Virtual machine Consolidation Needed’, right-click on the virtual machine and select VM -> Snapshots -> Consolidate.

consolidate snapshots in the vcenter console

A window with the following request appears:

Confirm Consolidate

This operation consolidates all redundant redo logs on your virtual machine. Are you sure you want to continue?

This operation consolidates all redundant redo logs on your virtual machine

Confirm that you want to delete the redundant logs. Then vCenter will consolidate disks and clear the logs. The consolidation may take a few minutes and the VM performance may degrade.

consolidating vmdisks vsphere

After that the warning of the VM consolidation will disappear.

In some cases, during consolidation you may see this error in the vSphere console:

Unable to access file since it is locked. An error occurred while consolidating disks: Failed to lock the file. Consolidation failed for disk node ‘scsi0:0’: Failed to lock the file.

vm consolidate: Unable to access file since it is locked. An error occurred while consolidating disks: Failed to lock the file. Consolidation failed for disk node

In this case VMware recommends to restart Management agents on the ESXi server. To do it, connect to the host via SSH and run this command:

services.sh restart

restart Management agents on esxi: services.sh restart

However, you can try to unlock the VM files as follows:

  1. Shutdown the VM if it is possible;
  2. Create a new snapshot;
  3. Delete all the VM snapshots using the ‘Delete All’ option;
  4. Move running VM to another ESXi using vMotion;
  5. Try to consolidate snapshots as described above.

You can find all virtual machines that require consolidation using PowerCLI. To do it, connect to your vCenter server:

Connect-VIServer mun_vsphere.woshub.com

Get the 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 machines in the list:

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

ConsolidateVMDisks using vmware powercli

0 comment
3
Facebook Twitter Google + Pinterest
previous post
Remote Desktop Cannot Verify the Identity of Remote Computer Because Time/Date Difference
next post
Running PowerShell Startup (Logon) Scripts Using GPO

Related Reading

Create Organizational Units (OU) Structure in Active Directory...

May 17, 2022

Windows Security Won’t Open or Shows a Blank...

May 17, 2022

How to Manually Install Windows Updates from CAB...

May 16, 2022

Updating VMware ESXi Host from the Command Line

May 11, 2022

Enable or Disable MFA for Users in Azure/Microsoft...

April 27, 2022

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows 7
  • Windows Server 2019
  • Windows Server 2016
  • Windows Server 2012 R2
  • PowerShell
  • VMWare
  • Hyper-V
  • MS Office

Recent Posts

  • Create Organizational Units (OU) Structure in Active Directory with PowerShell

    May 17, 2022
  • Windows Security Won’t Open or Shows a Blank Screen on Windows 10/ 11

    May 17, 2022
  • How to Manually Install Windows Updates from CAB and MSU Files?

    May 16, 2022
  • RDS and RemoteApp Performance Issues on Windows Server 2019/2016

    May 16, 2022
  • Deploying Software (MSI Packages) Using Group Policy

    May 12, 2022
  • Updating VMware ESXi Host from the Command Line

    May 11, 2022
  • Enable or Disable MFA for Users in Azure/Microsoft 365

    April 27, 2022
  • Fix: You’ll Need a New App to Open This Windows Defender Link

    April 27, 2022
  • How to Reset an Active Directory User Password with PowerShell and ADUC?

    April 27, 2022
  • How to Completely Uninstall Previous Versions of Office with Removal Scripts?

    April 26, 2022

Follow us

woshub.com

ad

  • Facebook
  • Twitter
  • RSS
Popular Posts
  • How to Find the Source of Account Lockouts in Active Directory domain?
  • Get-ADComputer: Find Computer Details in Active Directory with PowerShell
  • How to Create a UEFI Bootable USB Drive to Install Windows 10 or 7?
  • Adding Third-Party Drivers into VMWare ESXi 6.7 ISO Image
  • How to Delete Old User Profiles Using GPO and PowerShell?
  • Managing Printers and Drivers with PowerShell in Windows 10 / Server 2016
  • Managing User Photos in Active Directory Using ThumbnailPhoto Attribute
Footer Logo

@2014 - 2018 - Windows OS Hub. All about operating systems for sysadmins


Back To Top