Recently, we ran into a tricky case involving VMDK consolidation issues on a VM. Thought I’d share the resolution steps in case it helps someone else down the line, or serves as a useful reminder for similar problems in the future.
The Issue
We were unable to consolidate disks for a VM due to locked VMDK files. At first, this seemed like a standard lock situation, but things got more interesting.
Initial Investigation
We began by checking every ESXi host in the cluster to rule out a typical lock situation caused by one of the hosts. No luck there, the VMDKs weren’t locked by any ESXi directly.
Involving the Backup Team
Next, we collaborated with the backup team. They applied a workaround from Veritas (NetBackup), which involved unlocking the VM from both the master and media server:
🔗 Veritas KB: Article 100038201
Unfortunately, this didn’t solve the issue either. The VM disks remained locked.
A Deeper Look at the Media Server
Digging deeper, we checked the media server VM in vCenter. That’s when we spotted the root cause: the problematic VM’s disks were still attached under the media server’s hardware configuration in vCenter. Even though the backup job had finished, the disk mappings were still there — and that’s what was causing the consolidation lock.
The Fix
We applied the steps from the VMware or Veritas workarounds (both describing the same solution):
Here’s what we did (carefully!):
- Opened the media server in vCenter
- Navigated to the VM settings
- Manually removed the disks that belonged to the machine with consolidation issues
⚠️ Important Note:
When removing disks from the VM via vCenter, make absolutely sure that you do not select the option to delete the VMDKs from the datastore. You just want to detach them, not erase them!
The Result
As soon as the disks were detached from the media server, consolidation kicked in successfully. Problem solved.