In our day-to-day operation while working with backup and snapshot of a virtual machine you have been seen the warning under virtual machine like the Virtual Machine Disks Consolidation is Needed. Today we will talk about its caused and possible solution so stay tuned.
What is disk consolidation?
When you take a snapshot of virtual machines, it created the delta files and the presence of redundant delta disks can reduce virtual machine performance. You can combine such disks without violating a data dependency. After disk consolidation, redundant disks are removed, which improves virtual machine performance and saves a lot of storage space.
Why disk consolidation is needed?
The vSphere Client shows itself a warning message ‘Virtual Machine Disks Consolidation Is Needed ‘ under the virtual machine summary tab to perform a disk consolidation. Snapshot consolidation is very useful when snapshot disks fail to compress after a Delete or Delete all operations at snapshot Manager. It happens, if you delete a snapshot but its associated disk does not commit back to the base disk.
What is the procedure to perform a disk consolidation?
- Login to vSphere Web Client
- Navigate to the Virtual Machine
- Click on the Action button or right click on the virtual machine
- Select Snapshot option
- Go to Snapshot -> Consolidate
Go to Monitor tab and tasks to monitor the progress.
If It fails to consolidate check for the error message. Generally, this shows the file is locked. We will be discussing the common reason for solving the disk consolidation issue.
Solution for disk consolidation
Generally, there is some proxy backup server that performs the virtual machine backup jobs in the background. For backup purposes, it creates snapshots of the virtual machine and deletes automatically without affecting the virtual machine performance. But sometimes it does not delete all the associated files and caused the disk consolidation issue.
You should check the disk files of your virtual machine in both your VM and proxy servers. If you see the hard disks attached to the proxy backup server then simply remove it but make sure you do not delete it. After removing the disk files from the proxy server perform a disk consolidation for the virtual machine as suggested above. It should be able to do the same this time.
Another solution, you can migrate the virtual machine to another host that will release the locked file and perform the disk consolidation of the virtual machine.
You can use the below commands for checking the locked file. You should know the configuration file for the virtual machine.
vmfsfilelockinfo -p /vmfs/volumes/vm_name.vmx
Sometimes, we have to reboot the host to release the locked files but make sure you do this in planned maintenance.
- Investigating virtual machine file locks on ESXi (10051)
- Determining if there are leftover delta files
- Determining if a virtual machine is using snapshots
Other useful topics
- What Is VMware VSAN
- What Is VMware RDM
- How To Migrating Virtual Machines With RDMs
- Unable To Apply DRS Resource Settings On Host
- Top VMware Interview Questions And Answers
- Windows Server Administrator Scenario Based Interview Questions And Answers