Virtual Machine Files in VMware ESXi
Learn how VMware ESXi stores virtual machine files, including VMX, NVRAM, VMDK, snapshot, memory, swap, log, template, and RDM files.
A VMware ESXi virtual machine (VM) is represented by a collection of files stored together in a directory on a datastore. A datastore is the ESXi storage location that holds VM directories and their files.
These files work together to describe the VM, store its virtual disks, preserve firmware and runtime state, record logs, and support optional features. The exact file set depends on the VM's configuration and state. For example, a suspended VM can have a suspend-state file, a VM with snapshots can have snapshot files, and a VM template uses a template configuration file.
VMware ESXi virtual machine file types
| Filename pattern | File type | Purpose | When present |
|---|---|---|---|
<VM_name>.vmx | VMX configuration | Plain-text virtual machine configuration | Ordinary virtual machines |
<VM_name>.nvram | NVRAM | Virtual BIOS or firmware settings | Usually associated with a VM's firmware settings |
vmware.log | VM log | Operational records and diagnostic information | During VM operation and troubleshooting |
<VM_name>.vmtx | Template configuration | Configuration for a reusable VM template | VM templates |
<VM_name>.vswp | VM swap file | Supports memory reclamation during host memory contention | When ESXi creates VM swap space |
vmx-<VM_name>.vswp | VMX-related swap file | Additional VMX-related swap storage | When the relevant swap file is created |
<VM_name>.vmdk | VMDK descriptor | Text-based metadata describing a virtual disk | Standard virtual disks |
<VM_name>-flat.vmdk | Flat VMDK | Contains the actual data for a standard virtual disk | Standard virtual disks |
<VM_name>-rdm.vmdk | RDM mapping file | Maps the VM to a Raw Device Mapping device | Only when an RDM is configured |
<VM_name>.vmss | Suspend-state file | Stores the state of a suspended VM | Suspended VMs |
<VM_name>.vmsd | Snapshot metadata | Stores snapshot information and metadata | VMs with snapshot information |
<VM_name>.vmsn | Snapshot state | Stores running-state information captured when a snapshot is taken | Snapshots that capture VM state |
<VM_name>-delta.vmdk | Snapshot delta disk | Records virtual disk changes associated with a snapshot | VMs with snapshots |
Core configuration and firmware files
The .vmx configuration file
The .vmx file is the VMX configuration file. It is a plain-text file containing settings that define the virtual machine, such as its virtual hardware and references to virtual disks. The filename commonly follows the VM name, as in linux.vmx.
An ordinary VM is registered and operated using its VMX configuration. This file is not the virtual disk itself; it tells ESXi how the VM is configured and which supporting files it uses.
The .nvram firmware file
The .nvram file stores the virtual machine's BIOS or firmware settings. It preserves firmware-level configuration separately from the main VMX configuration.
The .vmtx template file
The .vmtx file is a template configuration file. A VM template is a reusable VM configuration intended for deploying new VMs. It is different from an ordinary running VM, whose primary configuration is represented by a .vmx file.
Virtual disk files
A standard VMware virtual disk is commonly represented by two related files:
- Descriptor file: The
.vmdkfile is text-based metadata describing the virtual disk. - Disk-data file: The
-flat.vmdkfile contains the actual virtual disk data.
For a VM named linux, the first virtual disk commonly appears as:
linux.vmdk
linux-flat.vmdk
The descriptor and flat file form one standard virtual disk. Do not assume that one visible .vmdk entry in a graphical interface means the disk contains only one physical file.
Names for multiple virtual disks
The first disk typically uses the VM name without a numeric suffix. The second disk uses the suffix _1, and later disks continue with numbered suffixes.
| Disk number | Descriptor file | Disk data file |
|---|---|---|
| First disk | <VM_name>.vmdk | <VM_name>-flat.vmdk |
| Second disk | <VM_name>_1.vmdk | <VM_name>_1-flat.vmdk |
| Later disks | Numbered suffixes continuing from _1 | Matching numbered -flat.vmdk files |
For example, a VM named vmhost with two standard virtual disks can contain:
vmhost.vmdk
vmhost-flat.vmdk
vmhost_1.vmdk
vmhost_1-flat.vmdk
Snapshot files
A snapshot preserves a point-in-time view of a VM. Snapshot-related files have different responsibilities and should not be treated as interchangeable:
.vmsdstores snapshot metadata, such as snapshot information and relationships..vmsnstores snapshot state, meaning running-state information captured when the snapshot was taken.-delta.vmdkstores changed virtual disk blocks associated with the snapshot.
Thus, the VMSD file describes snapshot information, the VMSN file can preserve captured VM state, and the delta VMDK records disk changes. A snapshot can consume increasing datastore space as its delta disk grows.
For a VM named appserver, a directory with snapshot-related files might include:
appserver.vmsd
appserver.vmsn
appserver-000001-delta.vmdk
The exact delta filename can include a snapshot sequence number. The important distinction is its -delta.vmdk role: it stores changes rather than being the original flat disk-data file.
For related administration, see Consolidate Snapshots.
Memory, suspend, and swap files
The .vmss suspend-state file
The .vmss file stores the state of a suspended virtual machine. Suspending a VM saves its runtime state so that it can resume later. This is different from swapping: a suspend file represents a saved VM state, not temporary host memory reclamation.
The .vswp VM swap file
The .vswp file is a VM swap file used when ESXi needs to reclaim VM memory during host memory contention. It supports memory management and is not a virtual disk containing the guest operating system.
An additional VMX-related swap filename has the form:
vmx-<VM_name>.vswp
For example, a VM might have a file named vmx-linux.vswp. The presence and size of swap-related files depend on the host and VM memory situation.
Learn more about the underlying concepts in Memory Management Technologies and Memory Overcommitment Explained.
Operational and special-purpose files
vmware.log
vmware.log records operational events for the virtual machine. Administrators can use it when investigating startup problems, virtual hardware issues, and other VM behavior.
RDM mapping files
Raw Device Mapping (RDM) is a configuration that gives a VM access to a mapped raw storage device. The VM directory can contain a mapping file named in the form <VM_name>-rdm.vmdk.
An RDM mapping file is not the same as a standard virtual disk's flat data file. It represents the mapping configuration for the RDM device and is present only when an RDM is configured. See Raw Device Mapping RDM for the related storage concept.
Viewing VM files in a datastore
Using vSphere Client or vSphere Web Client
- Open vSphere Client or vSphere Web Client.
- Locate the datastore that contains the virtual machine.
- Open the datastore browser.
- Open the directory named for the VM.
- Review the displayed filenames and associate their extensions with configuration, firmware, disks, snapshots, memory, logs, or special-purpose features.
No VM configuration changes are required for datastore browsing. It is a file-discovery and inspection method. The exact interface and file visibility can differ between graphical views and ESXi command-line output.
For datastore browsing guidance, see Browse VMFS Datastores.
Using a command-line view
A command-line inspection can show the complete contents of a VM directory, including descriptor files and their corresponding flat disk-data files. A read-only listing can use a path in this general form:
ls -l /vmfs/volumes/<datastore>/<VM_name>/
Replace the placeholders with the datastore and VM directory names in your environment. Use this command to inspect filenames only; do not use command-line file operations to alter the VM.
A graphical datastore view might show a virtual disk as one logical .vmdk entry or otherwise omit a related component. Command-line inspection can reveal both the text descriptor and the -flat.vmdk data file, making the complete disk relationship easier to verify.
Practical directory examples
Single-disk VM named linux
linux/
linux.vmx
linux.nvram
linux.vmdk
linux-flat.vmdk
vmware.log
Here, linux.vmx contains the VM configuration, linux.nvram contains firmware settings, and the two VMDK files together represent the standard virtual disk. The log records operational information.
Two-disk VM named vmhost
vmhost/
vmhost.vmx
vmhost.vmdk
vmhost-flat.vmdk
vmhost_1.vmdk
vmhost_1-flat.vmdk
The unsuffixed pair is the first disk. The pair containing _1 is the second disk. The suffix begins at _1 for the second virtual disk.
VM with a snapshot
appserver/
appserver.vmx
appserver.vmdk
appserver-flat.vmdk
appserver.vmsd
appserver.vmsn
appserver-000001-delta.vmdk
The VMSD file contains snapshot metadata, the VMSN file contains captured VM state, and the delta VMDK stores disk changes made in the snapshot chain.
Troubleshooting file listings
Only one .vmdk file appears graphically
A standard virtual disk normally has a descriptor and a corresponding -flat.vmdk data file. The graphical interface may not expose both in the same way. Inspect the VM directory from the command line to verify the complete pair.
Snapshot files consume unexpected datastore space
While snapshots exist, the VM can have .vmsd, .vmsn, and -delta.vmdk files. Identify each file type and relate it to the VM's snapshot state before troubleshooting storage use.
A VM has a file type absent from other VMs
File sets vary by feature and state. A .vmss file can indicate suspension, a .vmtx file can identify a template configuration, and an -rdm.vmdk file can indicate an RDM. Check the VM's operational state and configured hardware before treating the file as unexpected.
Exam-relevant distinctions
- VMX versus VMDK: VMX is the VM configuration; VMDK files represent virtual disk metadata and data.
- VMDK descriptor versus flat VMDK: The descriptor is text-based disk metadata; the flat file contains the actual standard disk data.
- VMSD versus VMSN versus delta VMDK: VMSD stores snapshot metadata, VMSN stores captured VM state, and the delta VMDK stores changed disk blocks.
- VMSS versus VSWP: VMSS stores a suspended VM's state; VSWP supports memory reclamation during host memory contention.
- VMX versus VMTX: VMX is used for an ordinary VM configuration; VMTX represents a reusable VM template configuration.
- Conditional files: Snapshots, suspension, templates, RDMs, and memory conditions determine which optional files appear.