In VMware, a flat file is a type of virtual disk file that stores the data for a virtual machine. It's a single file that contains the entire virtual disk, including the operating system, applications, and data.
: Use the ESXi command line (SSH) to find the exact size of the flat file in bytes using ls -l .
: A small text file that tells the hypervisor how to read the data (e.g., disk geometry, adapter type). vmware flat file restore
Here are some best practices to keep in mind:
: cd /vmfs/volumes/DATASTORE_NAME/VM_NAME . In VMware, a flat file is a type
Unlike agent-based file restores (which require an operating system to be running inside the VM), flat file restore works at the hypervisor or backup storage layer. It reads the raw data blocks of the VM’s virtual disk, parses the file system structure (NTFS, ext4, etc.), and extracts only the blocks belonging to the requested file.
: Delete the temp-flat.vmdk and rename temp.vmdk to match your original disk name. : A small text file that tells the
: Use a text editor like vi to open the new .vmdk file. Ensure the "Extent description" points to your original -flat.vmdk .
: # vmkfstools -c [SizeInBytes] -d thin -a [ControllerType] temp.vmdk . This creates a new temp.vmdk (descriptor) and temp-flat.vmdk . Swap the Descriptor : Delete the new, empty data file: rm temp-flat.vmdk . Rename the descriptor: mv temp.vmdk [OriginalVMName].vmdk .
Despite its utility, flat file restore is not a magic bullet. Administrators must be aware of its constraints: