If you encountered VMware error “virtual machine disk consolidation is needed”, what does it mean and how can you solve it? Here are possible reasons and 2 proven fixes.
Sometimes you may see a warning “virtual machine disks consolidation is needed” in the console of Vmware vSphere 5, 6.5, 6.7, etc. It is usually reported in the Summary tab of a VM, indicating that the snapshot deletion process is not completed successfully.
When you delete a snapshot, virtual machine disk consolidation should occur along with the deletion operation. But sometimes you may incorrectly delete a VM snapshot (due to various reasons), causing the snapshot VMDK files or logs to remain on the datastore. As a result, the virtual machine cannot be backed up.
In this article, I will analyze what possible reasons lead to this error, and provide 2 proven ways to resolve it.
This article covers:
In general, virtual disk consolidation is a process of merging snapshots into the original virtual machine.
Taking a VMware snapshot will make the original virtual disk file read-only, and create a delta disk file to store all changes made to the VM afterwards. The more and longer snapshots are kept, the more redundant data becomes, thus taking up more disk space and even affecting the performance of the original virtual machine.
Therefore, virtual machine disk consolidation is needed to merge snapshots and remove redundant data.
To do it, you just need to delete VMware snapshots properly via Snapshot Manager - this will merge them to the original virtual disk. But if you delete snapshots incorrectly, things can be dangerous.
Therefore, we can say the underlying reason for the virtual machine disk consolidation needed warning is usually an incomplete snapshot deletion caused by incorrect operation. And the way to get rid of that warning is to do the disk consolidation properly.
Except for incorrect operations, there are some other reasons that may cause a snapshot deletion fails to complete successfully. So before trying to performing disk consilidation, please check the following points to exclude any possible interference:
To solve the VMware virtual machine disk consolidation is needed error, you just need to perform disk consolidation properly after ruling out the above possible factors.
In this section, I will introduce 2 proven ways of how to do virtual machine disk consolidation.
1. Access to VMware ESXi web client, and navigate to Virtual Machines from the left inventory.
2. Right-click on the VM name and select Snapshots > Consolidate disks.
3. Click Yes to confirm disk consolidation of the VM.
1. Connect to vCenter server and provide relevant credentials:
Connect-VIServer -Server [server name] -Protocol [http] -User [user name] -Password [password]
2. Check which VM needs disk consolidation:
Get-VM | Where-Object {$_.Extensiondata.Runtime.ConsolidationNeeded}
3. Consolidate the disk of a specific virtual machine called MyVM:
(Get-VM -Name "MyVM").ExtensionData.ConsolidateVMDisks()
Tip: To consolidate all virtual machines that need disk consolidation: Get-VM | Where-Object {$_.Extensiondata.Runtime.ConsolidationNeeded} | foreach {$_.ExtensionData.ConsolidateVMDisks_Task()}
As you can see, using VMware snapshots incorrectly may result in errors, and keeping snapshots in the long run can have a negative impact on the performance of VM systems. So for better working with VMware snapshots, here I summarized 3 best practices.
It is commonly accepted that VM snapshot and backup cannot replace each other. Snapshots depend on the parent disk, if the parent disks are deleted, the snapshot files are not sufficient to restore a VM.
But VM backup is an independent copy of the VM, it can be safely stored offsite, to the cloud, or other locations. Restore from it you will gain an instant usable VM.
Actually, maximum of 32 snapshots are supported in a chain. However, the more snapshots you kept, the more they affect the VM performance.
Therefore, for a better performance please use only 2 to 3 snapshots.
For most times, you need to reserve 20-30% extra storage for a single snapshot. The longer you keep these snapshots, they will take more disk space and thus affect the performance of your VM.
It is recommended by VMware that do not to keep snapshots for more than 72 hours. Therefore, it is necessary to delete the snapshots in time to merge the changes to the parent disk when they are no longer useful, or before creating backups of your VM.
Just like the VMware virtual machine disk consolidation is needed error, manually backup VMware VMs may also result in many other errors. Therefore, to avoid manual errors, many IT staffs turn to dedicated backup tools that can backup VMs automatically.
Here I recommend you AOMEI Cyber Backup, it automates the backup process of VMs, monitors the status and sends email notifications if there's an error. In addition, the free VMware backup software for the following benefits:
✦ Auto Execution: capable of backing up multiple VMs automatically based on daily, weekly, monthly schedule. ✦ Role Assignment: allows one administrator to create sub-accounts with limited privileges, effectively avoid errors caused by others’ mis-operations. ✦ Restore from Any Point: capable of restoring the entire VM from any created history backup versions. ✦ Support Free ESXi: AOMEI Cyber Backup supports both paid and free versions of VMware ESXi. ✦ Perpetual Free Edition: you can also use this free version to protect your VMs with on time limit.
In next section I will demonstrate how to create an automatic backup task of ESXi VMs. You can click the following button to enjoy the freeware:
*You can choose to install this VM backup software on either Windows or Linux system.
1. Bind Devices: Access to AOMEI Cyber Backup web client, navigate to Source Device > VMware > + Add VMware Device to add vCenter or Standalone ESXi host as the source device. And then click … > Bind Device.
Tip: Except for VMware ESXi 6.0 and all later versions, it also supports Hyper-V on Windows Server 2012 and all later versions.
2. Create Backup Task: Navigate to Backup Task > + Create New Task, and then set Task Name, Backup Type, Device, Target, Schedule, and Cleanup.
3. Start Backup: You can select Add the schedule and start backup now, or Add the schedule only.
Created backup tasks will be listed and monitored separately, for progress checking and schedule changing.
While the Free Edition covers most of the VM backup needs, you can also upgrade to Premium Edition to enjoy: ✦ Batch VM Backup: batch backup large numbers of VMs managed by vCenter Server or standalone ESXi hosts. ✦ Backup Cleanup: configure retention policy to auto delete the old backup files and save storage space. ✦ Restore to new location: easily make a clone of a virtual machine in the same or another datastore/host, without reinstalling or configuring a new VM.
The VMware virtual machine disk consolidation is needed error is commonly caused by incomplete of snapshot deletion. To fix this, I introduced 2 methods of how to do virtual machine disk consolidation in VMware in this article.
Just like large VMware snapshot size can result in performance degradation, incorrect snapshot deletion can even cause data loss. Therefore, I also summarized 3 best practices for using snapshots. If you want to further protect your VM data from accidental mis-operations, especially from manual errors, some professional backup software may be very helpful.