Quick answer: Virtual machine disks consolidation is needed means a snapshot delta file is still in use, usually after a backup job. Make sure no backup is running and the datastore has space, find the lock with vmfsfilelockinfo, release it, then run Consolidate in the vSphere Client.
| Step | What to do |
|---|---|
| Step 1 | Rule Out a Running Backup and Low Datastore Space |
| Step 2 | Find Who Holds the Lock With vmfsfilelockinfo |
| Step 3 | Release the Lock Without Losing Data |
| Step 4 | How to Consolidate VM Disks in vSphere |
Virtual machine disks consolidation is needed is one of those yellow banners in the vSphere Client that looks harmless and quietly eats your datastore. It usually shows up the morning after a backup run: the snapshot is gone from Snapshot Manager, but the VM is still writing to a -00000X.vmdk delta file. You right-click, choose Consolidate, and the task fails with “Unable to access file since it is locked”. I have run into this more times than I would like, almost always with a snapshot-based backup product in the picture. In this guide I walk through the order I use to clear it: check the two boring causes first, find the lock owner with vmfsfilelockinfo, release it safely, and then consolidate from the UI or PowerCLI.
Why Virtual Machine Disks Consolidation Is Needed
Every snapshot creates a delta disk, and all new writes go to that delta. When a snapshot is deleted, ESXi has to merge (consolidate) the delta back into the parent disk. If that merge does not finish, vCenter sets the VM’s consolidationNeeded runtime flag and shows the banner on the Summary tab. According to Broadcom KB 321365, the summary tab can show “Virtual machine disks consolidation is needed” or “Virtual machine Consolidation Needed status”, and the consolidate task fails with messages like these:
- Failed to lock the file
- One or more disks are busy
- Unable to access file since it is locked (in the task as Unable to access file <unspecified filename> since it is locked)
- An error occurred while consolidating disks: msg.fileio.lock or msg.snapshot.error-DISKLOCKED
Broadcom lists ESXi and vCenter 7.x to 9.x as affected, together with third-party backup products such as Veeam, Commvault and Cohesity. In practice the root cause falls into one of three buckets:
- A stale lock held by a backup proxy VM that hot-added the disk (HotAdd transport) and never released it, or by a hung backup process (NBD, NBDSSL or SAN transport).
- Not enough free space on the datastore to complete the merge. Broadcom KB 392530 recommends having at least 1.5 times the total snapshot size free before you start.
- A stuck task or orphaned VM process on the ESXi host that still has the file open.

A practical warning before you touch anything: as long as virtual machine disks consolidation is needed on a VM, the VM keeps growing its delta file. On a busy database server that can fill a datastore faster than you expect, so do not leave this until next week.
Step 1: Rule Out a Running Backup and Low Datastore Space
Before you chase locks, remember that virtual machine disks consolidation is needed can also be a plain capacity problem. Broadcom’s first instruction is simple: make sure no backup job is running against the affected VM. I check the backup console first, because forcing a consolidation in the middle of an active job only creates a second problem. If a job is hanging, cancel it from the backup product, wait a few minutes and see whether the backup software triggers consolidation on its own; Broadcom KB 420243 describes exactly that path for a stale backup appliance job.
Next, look at free space on the VM’s datastore. You can see it in the vSphere Client under Storage, or with PowerCLI:
Get-VM -Name app01 | Get-Datastore | Select-Object Name, FreeSpaceGB, CapacityGB
Get-VM -Name app01 | Get-Snapshot | Measure-Object -Property SizeGB -SumCode language: JavaScript (javascript)If free space is below roughly 1.5 times the snapshot total, free some space first (remove old ISOs, Storage vMotion another VM away, or grow the datastore). KB 392530 is clear that insufficient capacity makes the operation fail, and retrying without space only burns time.
Step 2: Find Who Holds the Lock With vmfsfilelockinfo
If the error mentions a lock, the next job is to identify the owner. On vSphere 8.0 U2 and later this got much easier: Broadcom KB 314365 notes that the lock owner is shown in the vSphere Client under the VM’s Monitor > Tasks and Events > Tasks, in the status of the failed task, including the host name, MAC address and lock mode.
On older builds, or when I want the raw answer, I enable SSH on the host where the VM is registered and run vmfsfilelockinfo against the delta or flat file named in the error:
vmfsfilelockinfo -p /vmfs/volumes/<datastore-UUID>/app01/app01-000001-delta.vmdk
# Let it resolve the MAC address to an ESXi host through vCenter:
vmfsfilelockinfo -p /vmfs/volumes/<datastore-UUID>/app01/app01-000001-delta.vmdk -v <vCenter IP> -u [email protected]Code language: HTML, XML (xml)The output tells you the lock mode and the MAC address of the host that owns it. Mode 1 is an exclusive lock, mode 2 is read-only and mode 3 is multi-writer. Then, on the host that owns the lock, find the process with lsof and map its Cartel ID to a VM name:
lsof | egrep 'Cartel|app01-000001-delta.vmdk'
esxcli vm process listCode language: PHP (php)The VMX Cartel ID in esxcli vm process list that matches the lsof output is the VM holding your disk. When virtual machine disks consolidation is needed right after a backup window, that VM is usually the backup proxy, not the affected VM itself, which matches the cause Broadcom describes in KB 321365.
Read more: if the host itself drops out of vCenter while you are troubleshooting, see ESXi Host Not Responding in vCenter: 7 Proven Steps to Fix It.
Step 3: Release the Lock Without Losing Data
HotAdd: remove the disk from the backup proxy
This is the most common fix when virtual machine disks consolidation is needed after a backup. Following KB 321365, with no backup job running:
- Right-click the backup proxy VM and choose Edit Settings.
- Expand the hard disk list and find the disk that belongs to the affected VM (check the file path).
- Click the X to remove it. Do not tick Delete files from the datastore, or you delete the production VM’s disk.
- Click OK, then run the consolidation again. If the virtual machine disks consolidation is needed banner clears, you are done.
This is the step where I slow down. Read the file path twice before clicking OK; the proxy’s own system disk and the hot-added disk look very similar in the list.
NBD, NBDSSL or SAN transport: stop the hung backup process
With network or SAN transport there is no hot-added disk to remove. Broadcom’s guidance is to stop the hung backup process inside the proxy (your backup vendor can tell you which service), or, with no jobs running, reboot the backup proxy VM to clear the lock.
Stuck task on the ESXi host
If lsof shows the file open by a host service rather than a VM, Broadcom KB 316576 walks through finding the task and restarting the management agents:
vim-cmd vmsvc/getallvms | grep -i app01
vim-cmd vmsvc/get.tasklist <VM ID>
vim-cmd vimsvc/task_info <Task ID>
# Disable HA host monitoring in the cluster first, then:
/etc/init.d/hostd restart
/etc/init.d/vpxa restartCode language: HTML, XML (xml)Disable vSphere HA host monitoring before restarting the agents so HA does not start a failover while hostd is down. After a short wait, vim-cmd vmsvc/get.tasklist <VM ID> should return an empty list. If the host disconnects from vCenter afterwards and the UI only shows a 503 or upstream error, vCenter No Healthy Upstream Error? The Proven Fix covers the vCenter side.
A note for vSAN: KB 321365 adds an extra step for HotAdd locks on vSAN, moving the .lck files in the VM namespace to a temporary subfolder before consolidating. On VMFS there are no .lck files to move, because the locks live in VMFS metadata, so do not go looking for them there.
Step 4: How to Consolidate VM Disks in vSphere
Once the lock is gone and there is enough space, the consolidation itself is the easy part. Here is how to consolidate VM disks in vSphere from the client: right-click the VM, choose Snapshots > Consolidate, confirm, and watch the task in Recent Tasks. Large deltas can take a long time, and the VM stays online during the merge.

When the virtual machine disks consolidation is needed banner shows up on many VMs at once, I prefer PowerCLI. If the module is missing, install it from the PowerShell Gallery (Install-Module VMware.PowerCLI -Scope CurrentUser; newer Broadcom releases are published as VCF.PowerCLI). If that install fails, Install-Module Not Working? Fix NuGet and TLS 1.2 Errors Fast explains why.
Connect-VIServer -Server vcenter.contoso.local
# List every VM flagged with 'consolidation is needed'
$vms = Get-VM | Where-Object { $_.ExtensionData.Runtime.ConsolidationNeeded }
$vms | Select-Object Name, VMHost
# Start consolidation (returns a task; runs asynchronously)
foreach ($vm in $vms) {
$vm.ExtensionData.ConsolidateVMDisks_Task()
}Code language: PHP (php)ConsolidateVMDisks_Task() is the vSphere API method behind the Consolidate menu item. It returns immediately, so follow progress in Recent Tasks or with Get-Task. I run it in small batches rather than against the whole inventory, because several large merges on the same datastore at once can hurt storage latency.
Verify the Virtual Machine Disks Consolidation Is Needed Warning Is Gone
Do not trust the absence of an error alone. Check that nothing is flagged any more and that no delta files are left:
Get-VM | Where-Object { $_.ExtensionData.Runtime.ConsolidationNeeded } | Select-Object Name
Get-VM -Name app01 | Get-Snapshot
Get-HardDisk -VM app01 | Select-Object Name, FilenameCode language: JavaScript (javascript)Both of the first two commands should return nothing, and the Filename of each hard disk should point to the base app01.vmdk, not an -00000X.vmdk delta. On the ESXi shell, ls -lh in the VM folder should no longer show -delta.vmdk or -sesparse.vmdk files for that VM.

How I Keep the Warning From Coming Back
Clearing the banner once is easy; making sure virtual machine disks consolidation is needed does not become a weekly ticket takes a few habits:
- Keep the backup software current. Broadcom’s first recommendation in KB 321365 is to upgrade the backup product, because stale locks come from disk handles that were not closed cleanly.
- Watch the
ConsolidationNeededflag with the PowerCLI one-liner above in a scheduled report, so a VMware consolidation needed November 2026 surprise does not turn into a full datastore in December. - Keep datastore free space healthy; snapshots that cannot be merged are almost always on the fullest datastore.
- Do not keep snapshots as backups. Broadcom’s consolidating snapshots article (KB 316575) also warns that long snapshot chains make consolidation harder.
What this taught me: when virtual machine disks consolidation is needed, the consolidation is rarely the real problem. The real problem is whoever is still holding the disk, and five minutes with vmfsfilelockinfo beats an hour of retrying the Consolidate button.
FAQ
What does “Virtual machine disks consolidation is needed” mean?
It means a snapshot was removed but its delta disk was not merged back into the parent disk, so the VM is still running on a delta file. vCenter sets the consolidationNeeded flag and shows the warning on the VM Summary tab.
Is it safe to consolidate while the VM is powered on?
Yes. Consolidation runs online and the VM stays available. Make sure no backup job is running on the VM and that the datastore has enough free space, ideally at least 1.5 times the total snapshot size.
How do I fix “Unable to access file since it is locked” during consolidation?
Find the lock owner with vmfsfilelockinfo or, on vSphere 8.0 U2 and later, from the failed task status. If a backup proxy hot-added the disk, remove that disk from the proxy without deleting files, then run Consolidate again.
Can I delete the -000001.vmdk delta files manually?
No. The delta files hold data written since the snapshot. Deleting them destroys those changes and can leave the VM unbootable. Always merge them with a consolidation task.
How do I find every VM that needs consolidation?
With PowerCLI run Get-VM | Where-Object { $_.ExtensionData.Runtime.ConsolidationNeeded }. You can then call ConsolidateVMDisks_Task() on each result, preferably in small batches.
References
Broadcom KB 321365: Snapshot consolidation fails due to locks held by third party backup software
Broadcom KB 316576: Troubleshooting issues resulting from locked virtual disks
Broadcom KB 314365: Investigating virtual machine file locks on ESXi hosts
Broadcom KB 392530: Not able to consolidate a VM due to insufficient disk space on datastore
Broadcom KB 420243: Virtual machine disk consolidation fails due to the file locked by backup appliance
Broadcom KB 316575: Consolidating/Committing snapshots in VMware ESXi






