The warning “Virtual machine disks consolidation is needed” means Snapshot Manager believes the VM has no snapshots, but delta disks still exist on the datastore and the VM is writing to them. It appears almost exclusively after a backup product’s snapshot removal only half completed: the snapshot entry was deleted from the .vmsd file, but the merge of the delta into the base disk failed, usually because the backup proxy still held the disk open. Left alone, the deltas grow until the datastore fills. The steps below apply to ESXi 7.0, 8.0 U3 and 9.x.
Applies to ESXi 7.0, 8.0 U3 and 9.x
Table of Contents
Short answer: Right-click the VM in the vSphere Client and choose Snapshots » Consolidate, or from the host shell run vim-cmd vmsvc/snapshot.removeall <VMID> followed by vim-cmd vmsvc/get.summary <VMID> to check the consolidationNeeded flag. If consolidation fails with “unable to access file since it is locked”, find which host or proxy holds the lock with vmkfstools -D and release it (usually by removing the disk from the backup proxy VM), make sure the datastore has free space at least equal to the largest delta, and rerun.
Confirm the state
From the host shell:
vim-cmd vmsvc/getallvms | grep -i vmname
vim-cmd vmsvc/get.summary 23 | grep -i consolidation
vim-cmd vmsvc/snapshot.get 23
ls -lh /vmfs/volumes/datastore1/vmname/ | grep -i delta
consolidationNeeded = true together with an empty snapshot tree and one or more -000001-delta.vmdk files confirms the condition. Note the delta sizes; consolidation writes the delta contents into the parent and temporarily needs free space on the datastore.
Consolidate from the client
In the vSphere Client select the VM, then Actions » Snapshots » Consolidate. The task shows in Recent Tasks and can take from minutes to hours depending on delta size and storage speed. The VM stays running; expect increased latency while the merge proceeds. In the Host Client (standalone ESXi) the same option lives under the VM’s Actions » Snapshots menu.
From the shell the equivalent is:
vim-cmd vmsvc/snapshot.removeall 23
This removes any remaining snapshot entries and triggers consolidation of orphaned deltas. Follow progress with vim-cmd vmsvc/get.tasklist 23 and vim-cmd vimsvc/task_info <task>.
Deal with locked files
The most common failure is “Unable to access file <unspecified filename> since it is locked” or a consolidation task that ends at 99% with an error. A backup proxy VM using hot-add transport has the base disk attached. Identify the lock owner:
vmkfstools -D /vmfs/volumes/datastore1/vmname/vmname-flat.vmdk
The output includes an owner field holding the MAC address of the host that owns the lock. On that host, check esxcli vm process list for a backup proxy, edit the proxy VM’s settings, and remove the hot-added disk (do not delete it from disk). If the owner is the same host running the VM and no proxy is involved, a stale lock can be released by vMotioning the VM to another host or, for a powered-off VM, by restarting the management agents with /etc/init.d/hostd restart.
Once the lock is gone, rerun the consolidation.
Also check free space before you start. Consolidation of a large delta needs roughly the delta’s size in free space while the merge runs, and more if the parent is thin-provisioned and grows. Check with:
df -h /vmfs/volumes/datastore1
If space is tight, Storage vMotion the VM to a larger datastore; the migration consolidates the chain as part of the copy, which is often the fastest way out of a full-datastore situation.
Verify
After the task completes:
vim-cmd vmsvc/get.summary 23 | grep consolidationNeeded
ls /vmfs/volumes/datastore1/vmname/ | grep -c delta
cat /vmfs/volumes/datastore1/vmname/vmname.vmx | grep -i vmdk
The flag should read false, no delta files should remain, and the .vmx should reference the base .vmdk directly. The warning icon disappears from the VM in the client within a minute.
Prevent it recurring
- Configure backup jobs to verify snapshot removal and alert on failure; most products have a post-job consolidation check.
- Enable the vCenter alarm “Virtual machine consolidation needed status” and send it to your ticket queue.
- Give backup proxies enough SCSI controllers and avoid running proxies and their targets on the same overloaded host.
- Schedule a weekly script that runs
vim-cmd vmsvc/get.summaryacross VMs and reports any with the flag set; a PowerCLI equivalent isGet-VM | Where-Object { $_.ExtensionData.Runtime.ConsolidationNeeded }.
Common pitfall
Deleting delta files by hand to clear the warning destroys every write since the snapshot was taken and leaves a VM that will not boot cleanly. If a chain is already broken, follow Fix “The redo log of .vmdk is corrupt” instead of removing files. Never run consolidation while a backup of the same VM is in progress; wait for the job to finish first.
Disks consolidation needed at a glance

Official documentation: Broadcom TechDocs (VMware), Linux man pages.
Related guides: MariaDB point-in-time recovery with binary logs (and 13.0’s innodb_log_archive) · Fix “Another task is already in progress” in vCenter with vim-cmd task_info · Fix ESXi “Datastore not accessible”: All Paths Down (APD) and Permanent Device Loss (PDL).
Frequently asked questions
Does consolidation require the VM to be powered off?
No. Consolidation runs against a powered-on VM, which is the normal case after a backup. Powered-off consolidation is faster and avoids the latency impact, so use a maintenance window for very large deltas if you can.
How long does snapshot consolidation take?
Roughly the time it takes the storage to read and write the delta size; a 50 GB delta on all-flash storage completes in minutes, while a 500 GB delta on spinning disk can take several hours. The task may sit at a fixed percentage for long periods and still be working.
Can I undo a consolidation?
No. Once the delta is merged into the parent, the pre-snapshot state is gone. If you need to keep a point-in-time copy, clone the VM before consolidating.
Maintenance record
This guide changes servers, data or security settings, so we re-check it against current versions on a fixed schedule. Take a backup or snapshot before you start.
- Maintained by
- srvScripts editorial team
- Supported versions
- ESXi 7.0, 8.0 U3 and 9.x
- Last full review
- Next review
- Sources
- techdocs.broadcom.com