Identification and safe removal of orphaned virtual disks (.vmdk), snapshot delta files, and leftover virtual machine folders. These "zombie" objects reside on the physical datastore but lack association with the vCenter Server inventory, leading to storage exhaustion and reporting discrepancies in tools like RVTools.
Datastore usage grows despite VM deletions.
RVTools identifies "Zombie vmdks" or "Zombie VMs".
Large numbers of -rdm.vmdk or -rdmp.vmdk files exist in directories with no registered VM.
*-0000##-sesparse.vmdk files in registered/running VM folder.VMware vSphere ESXi 7.x, 8.x
VMware vCenter Server 7.x, 8.x
VMFS and NFS Datastores
Orphaned files typically result from:
VMs being Removed from Inventory instead of Deleted from Disk.
RDM LUNs being unmapped or removed at the storage array level before the pointer file is detached from the VM.
Failed snapshot consolidation leaving residual delta files.
Interrupted Storage vMotion or VM deletion tasks.
Follow these steps to validate and remove orphaned files. Verify the file is not locked before deletion.
Verify files are not currently locked using documentation: Investigating Virtual Machine file locks on ESXi Host(s)
SSH into the ESXi host and list all contents:
ls -lh /vmfs/volumes/<datastore_name>/To list everything recursively and see sizes:
find /vmfs/volumes/<datastore_name>/ -type f -exec ls -lh {} \; | sort -kReplace <datastore_name> with your actual datastore name or its UUID path.
ls /vmfs/volumes/<datastore_name>/ > vmfs-folders.txtCompare this list with the registered VMs.
.vmdk FilesRun this to find .vmdk files not referenced by any registered VM:
find /vmfs/volumes/<datastore_name>/ -name "*.vmdk" > /tmp/vmdk-list.txtThen check for registered VMs that use them:
grep -i "$(basename <file>.vmdk)" /etc/vmware/hostd/vmInventory.xmlIf a .vmdk is not listed anywhere, it is likely orphaned.
Sometimes leftover snapshot delta files remain. Run this command to search for all of the virtual machine configuration files seen by the ESXi host and check if there is a file that looks like a snapshot disk:
find /vmfs/volumes/ -iname "*.vmx" -exec grep -HEie "-[0-9]{6}.vmdk" {} \;Any *-delta.vmdk not tied to a current VM should be investigated.
.vmdk Files to See if They Are Orphanedvmkfstools -i /vmfs/volumes/<datastore>/vm-folder/yourdisk.vmdk -d zeroedthick /tmp/test.vmdkIf it errors out or shows corruption, it is likely orphaned.
You can perform the following actions before deletion:
Rename suspected orphaned files (e.g., add .old) and observe.
Use vCenter > VM > Edit Settings to see which disks are attached.
Monitor the environment for 24–48 hours. If no production impact occurs, proceed to cleanup.
rm -i /vmfs/volumes/<datastore>/vm-folder/*.vmdkOr remove entire orphan folders:
rm -r /vmfs/volumes/<datastore>/orphan-folderIf deleting the orphaned/stale snapshots, proceed to move these files to a temp folder to monitor for a day and then proceed to delete them.
To speak with a customer representative or a Support Engineer see Contact Support. Scroll to the bottom of the page and click on your respective region.
Identify Zombie / Orphaned disks using VMware Aria Operations