Vmware Esxi

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 patternFile typePurposeWhen present
<VM_name>.vmxVMX configurationPlain-text virtual machine configurationOrdinary virtual machines
<VM_name>.nvramNVRAMVirtual BIOS or firmware settingsUsually associated with a VM's firmware settings
vmware.logVM logOperational records and diagnostic informationDuring VM operation and troubleshooting
<VM_name>.vmtxTemplate configurationConfiguration for a reusable VM templateVM templates
<VM_name>.vswpVM swap fileSupports memory reclamation during host memory contentionWhen ESXi creates VM swap space
vmx-<VM_name>.vswpVMX-related swap fileAdditional VMX-related swap storageWhen the relevant swap file is created
<VM_name>.vmdkVMDK descriptorText-based metadata describing a virtual diskStandard virtual disks
<VM_name>-flat.vmdkFlat VMDKContains the actual data for a standard virtual diskStandard virtual disks
<VM_name>-rdm.vmdkRDM mapping fileMaps the VM to a Raw Device Mapping deviceOnly when an RDM is configured
<VM_name>.vmssSuspend-state fileStores the state of a suspended VMSuspended VMs
<VM_name>.vmsdSnapshot metadataStores snapshot information and metadataVMs with snapshot information
<VM_name>.vmsnSnapshot stateStores running-state information captured when a snapshot is takenSnapshots that capture VM state
<VM_name>-delta.vmdkSnapshot delta diskRecords virtual disk changes associated with a snapshotVMs 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 .vmdk file is text-based metadata describing the virtual disk.
  • Disk-data file: The -flat.vmdk file 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 numberDescriptor fileDisk data file
First disk<VM_name>.vmdk<VM_name>-flat.vmdk
Second disk<VM_name>_1.vmdk<VM_name>_1-flat.vmdk
Later disksNumbered suffixes continuing from _1Matching 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:

  • .vmsd stores snapshot metadata, such as snapshot information and relationships.
  • .vmsn stores snapshot state, meaning running-state information captured when the snapshot was taken.
  • -delta.vmdk stores 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

  1. Open vSphere Client or vSphere Web Client.
  2. Locate the datastore that contains the virtual machine.
  3. Open the datastore browser.
  4. Open the directory named for the VM.
  5. 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.