Virtual Disk Descriptor File Missing – Quick Fix
The .vmdk descriptor file goes missing when you move or rename a virtual disk. Here's how to rebuild it fast.
Cause #1: You moved or renamed the virtual disk files manually
This is the #1 reason the descriptor file goes missing. You had a VM folder, maybe you copied the files to a new datastore or renamed them to something cleaner. Suddenly you get an error like “Cannot open the disk” or “The virtual disk is missing”.
What happened: The .vmdk file you see in the datastore is actually a small descriptor header – it’s maybe 1KB big. It points to the real data in the -flat.vmdk or -delta.vmdk file. If you move or rename them separately, the descriptor loses track. I had a client last month who renamed a VM folder in vSphere Client and ended up with all three VMDKs orphaned. Took 20 minutes to fix.
How to fix it
- Go to your datastore and find the -flat.vmdk file. This holds the actual virtual disk data.
- Create a new .vmdk descriptor file using a command like this (run on the ESXi host via SSH or on a Linux VM):
Replace the path with yours. This rebuilds the descriptor.vmkfstools -d thin /vmfs/volumes/datastore1/vmname/vmname-flat.vmdk - If you don't have
vmkfstools, you can also use a hex editor to copy the descriptor from a working .vmdk of the same size – but honestly, just use the tool. - After rebuild, attach the new .vmdk to the VM and power on. It should work.
Cause #2: The descriptor file is corrupt or truncated
Sometimes the descriptor file just gets corrupted – maybe from a failed datastore migration, a crash during a snapshot delete, or a bad backup restore. The descriptor file might be 0 bytes or filled with garbage.
This is different from missing – the file is there but it’s broken. You’ll see errors like “Invalid header” or “Cannot open disk”.
How to fix it
- Check the file size. If it’s not around 512 bytes to 4KB, it’s likely corrupt.
- Delete the corrupt descriptor file (keep the -flat.vmdk!).
- Use
vmkfstoolsas above to regenerate it. - If you don’t have the tool, you can manually create one using a text editor. Here’s a sample descriptor for a thin-provisioned disk:
Adjust the size (83886080 is 40GB, change it). The CID can stay as fffffffe.# Disk DescriptorFile version=1 encoding="UTF-8" CID=fffffffe parentCID=ffffffff createType="vmfs" # Extent description RW 83886080 VMFS "vmname-flat.vmdk" # The Disk Data Base #DDB - Save the file with the same name as the original .vmdk. Attach and test.
Cause #3: The flat file itself is missing or renamed
Less common, but I’ve seen it. Someone deletes the -flat.vmdk thinking it’s the temporary file, or they rename the folder and the flat file gets lost. The descriptor file exists but can’t find the data.
Error looks like “Cannot find extent file”.
How to fix it
- Check the datastore for files like
vmname.vmdk(the descriptor) andvmname-flat.vmdk(the data). If the flat file is missing, you’re in trouble – data is gone. - If you accidentally renamed it, rename it back to match the descriptor’s extent name. For example, if descriptor expects
myvm-flat.vmdk, renamemyvm_old.vmdktomyvm-flat.vmdk. - If the flat file is truly gone, restore from backup. No magic trick here.
Quick Reference Table
| What's Missing | Fix | Time Needed |
|---|---|---|
| Descriptor .vmdk (1KB file) | Use vmkfstools to rebuild from flat file | 5 minutes |
| Corrupt descriptor | Delete and regenerate descriptor | 10 minutes |
| Flat .vmdk (data file) | Restore from backup or rename if misplaced | Depends |
Bottom line: descriptor missing is usually a quick fix. Just don’t delete the flat file – that’s where your data lives. And always keep a backup snapshots before moving VMDKs around. Learned that the hard way myself.
Was this solution helpful?