Virtual machine files in ESXi
Each VM consists of several types of files stored on a storage device. Here is a list and a description of some of the files that make up a virtual machine running on ESXi:
- Configuration file (<VM_name>.vmx) – a plain-text file that stores the settings of a virtual machine.
- Swap files (<VM_name>.vswp, vmx-<VM_name>.vswp) – a virtual machine swap file used to reclaim memory during periods of contention.
- BIOS file (<VM_name>.nvram) – a file that contains the virtual machine’s BIOS.
- Log files (vmware.log) – a virtual machine log file.
- Template file (<VM_name>.vmtx) – a virtual machine template configuration file.
- Raw device map file (<VM_name>-rdm.vmdk) – the mapping file for the RDM that manages mapping data for the RDM device.
- Disk descriptor file (<VM_name>.vmdk) – text file containing descriptive data about the virtual hard disk.
- Disk data file (<VM_name>-flat.vmdk) – the actual content of that disk.
- Suspend state file (<VM_name>.vmss) – a file that stores the state of a suspended virtual machine.
- Snapshot data file (<VM_name>.vmsd) – a file that stores information and metadata about snapshots.
- Snapshot state file (<VM_name>.vmsn) – a file that stores the running state of a virtual machine at the time the snapshot was taken.
- Snapshot disk file (<VM_name>-delta.vmdk)
The first virtual disk files have filenames <VM_name>.vmdk and <VM_name>-flat.vmdk. If a virtual machine has more than one disk file, the second and later disk files would have the filenames <VM_name>_#.vmdk and <VM_name>_$-flat.vmdk, starting with 1. For example, if a virtual machine named vmhost have two disks, the files would be called vmhost.vmdk, vmhost-flat.vmdk, vmhost_1.vmdk and vmhost_1-flat.vmdk.
You can display a virtual machine’s files with the vSphere Web Client or vSphere Client by browsing the datastore on which the virtual machine is stored. Here is a screenshot from vSphere Web Client that shows the files of the virtual machine named linux:
Note that there is only one .vmdk file shown in the picture above. In reality, a virtual disk consists of two files, .vmdk and -flat.vmdk. To see both files, you would have to go to a command-line interface.