To store virtual disks, ESXi uses datastores. The datastores are logical containers that hide specifics of physical storage from virtual machines and provide a uniform model for storing the virtual machine files. The datastores that you deploy on block storage devices use the native vSphere Virtual Machine File System (VMFS) format. It is a special high-performance file system format that is optimized for storing virtual machines.

Use the vSphere Client to set up the VMFS datastore in advance on the block-based storage device that your ESXi host discovers.

After creating a datastore, you can perform basic administration operations, such as renaming, unmounting, or removing the datastore. You can also perform more advanced tasks, for example, expand the datastore, manage duplicate datastores, or collect datastore diagnostic information.

The workflow that you use when managing the VMFS datastores generally includes the following actions.
Action Description
1. Create a vSphere VMFS Datastore Set up the VMFS datastore on the block-based storage device that your ESXi host discovers.
2. Perform Basic Administration Operations for Datastores Perform basic administration operations, such as renaming, unmounting, or removing the datastore.
3. Perform Advanced VMFS Datastore Tasks Perform more advanced tasks, for example, expand the datastore, manage duplicate datastores, or collect datastore diagnostic information.
4. Browse the Datastore Use the datastore file browser in your vSphere environment to manage contents of your datastores. You can upload files or folders, download files from the datastore, or move or copy folders or files to a new location. You can also use the datastore browser to inflate the thin virtual disk.

Versions of VMFS Datastores

Several versions of the VMFS file system have been released since its introduction. Currently, ESXi supports VMFS5 and VMFS6.

For all supported VMFS version, ESXi offers complete read and write support. On the supported VMFS datastores, you can create and power on virtual machines.

Table 1. Host Access to VMFS Versions
VMFS6 Read and write
VMFS5 Read and write
The following table compares major characteristics of VMFS5 and VMFS6. For additional information, see Configuration Maximums .
Table 2. Comparing VMFS5 and VMFS6
Features and Functionalities VMFS5 VMFS6
Access for ESXi hosts version 6.5 and later Yes Yes
Access for ESXi hosts version 6.0 and earlier Yes No
Datastores per host 512 512
512n storage devices Yes Yes (default)
512e storage devices Yes. Not supported on local 512e devices. Yes (default)
4Kn storage devices No Yes
Automatic space reclamation No Yes
Manual space reclamation through the esxcli command. See Manually Reclaim Accumulated Storage Space on VMFS5. Yes Yes
Space reclamation from guest OS Limited Yes
GPT storage device partitioning Yes Yes
MBR storage device partitioning Yes

For a VMFS5 datastore that has been previously upgraded from VMFS3.

Storage devices greater than 2 TB for each VMFS extent Yes Yes
Support for virtual machines with large capacity virtual disks, or disks greater than 2 TB Yes Yes
Support of small files of 1 KB Yes Yes
Default use of ATS-only locking mechanisms on storage devices that support ATS. See vSphere VMFS Locking Mechanisms. Yes Yes
Block size Standard 1 MB Standard 1 MB
Default snapshots VMFSsparse for virtual disks smaller than 2 TB.

SEsparse for virtual disks larger than 2 TB.

Virtual disk emulation type 512n 512n
vMotion Yes Yes
Storage vMotion across different datastore types Yes Yes
High Availability and Fault Tolerance Yes Yes
DRS and Storage DRS Yes Yes
RDM Yes Yes
When you work with VMFS datastores, consider the following:
  • Datastore Extents. A spanned VMFS datastore must use only homogeneous storage devices, either 512n, 512e, or 4Kn. The spanned datastore cannot extend over devices of different formats.
  • Block Size. The block size on a VMFS datastore defines the maximum file size and the amount of space a file occupies. VMFS5 and VMFS6 datastores support the block size of 1 MB.
  • Storage vMotion. Storage vMotion supports migration across VMFS, vSAN, and Virtual Volumes datastores. vCenter Server performs compatibility checks to validate Storage vMotion across different types of datastores.
  • Storage DRS. VMFS5 and VMFS6 can coexist in the same datastore cluster. However, all datastores in the cluster must use homogeneous storage devices. Do not mix devices of different formats within the same datastore cluster.
  • Device Partition Formats. Any new VMFS5 or VMFS6 datastore uses GUID partition table (GPT) to format the storage device. The GPT format enables you to create datastores larger than 2 TB. If your VMFS5 datastore has been previously upgraded from VMFS3, it continues to use the master boot record (MBR) partition format, which is characteristic for VMFS3. Conversion to GPT happens only after you expand the datastore to a size larger than 2 TB.

VMFS Datastores as Repositories

ESXi can format SCSI-based storage devices as VMFS datastores. VMFS datastores primarily serve as repositories for virtual machines.

Note: Always have only one VMFS datastore for each LUN.

You can store multiple virtual machines on the same VMFS datastore. Each virtual machine, encapsulated in a set of files, occupies a separate single directory. For the operating system inside the virtual machine, VMFS preserves the internal file system semantics, which ensures correct application behavior and data integrity for applications running in virtual machines.

When you run multiple virtual machines, VMFS provides specific locking mechanisms for the virtual machine files. As a result, the virtual machines can operate safely in a SAN environment where multiple ESXi hosts share the same VMFS datastore.

In addition to the virtual machines, the VMFS datastores can store other files, such as the virtual machine templates and ISO images.

Sharing a VMFS Datastore Across Hosts

As a cluster file system, VMFS lets multiple ESXi hosts access the same VMFS datastore concurrently.

Figure 1. Sharing a VMFS Datastore Across Hosts
The image shows a single VMFS datastore being accessed by multiple servers.

For information on the maximum number of hosts that can connect to a single VMFS datastore, see the Configuration Maximums document.

To ensure that multiple hosts do not access the same virtual machine at the same time, VMFS provides on-disk locking. For more details about the ATS-only and ATS+SCSI locking mechanisms that VMFS uses, see vSphere VMFS Locking Mechanisms. You can also learn how to display information about locking mechanisms, how to change from ATS+SCSI to ATS-only, or how to downgrade to ATS+SCSI.

Sharing the VMFS volume across multiple hosts offers several advantages, for example, the following:

  • You can use VMware Distributed Resource Scheduling (DRS) and VMware High Availability (HA).

    You can distribute virtual machines across different physical servers. That means you run a mix of virtual machines on each server, so that not all experience high demand in the same area at the same time. If a server fails, you can restart virtual machines on another physical server. If the failure occurs, the on-disk lock for each virtual machine is released. For more information about VMware DRS, see the vSphere Resource Management documentation. For information about VMware HA, see the vSphere Availability documentation.

  • You can use vMotion to migrate running virtual machines from one physical server to another. For information about migrating virtual machines, see the vCenter Server and Host Management documentation.

To create a shared datastore, mount the datastore on those ESXi hosts that require the datastore access. See Mount Datastores.

VMFS Metadata Updates

A VMFS datastore holds virtual machine files, directories, symbolic links, RDM descriptor files, and so on. The datastore also maintains a consistent view of all the mapping information for these objects. This mapping information is called metadata.

Metadata is updated each time you perform datastore or virtual machine management operations. Examples of operations requiring metadata updates include the following:

  • Creating, growing, or locking a virtual machine file
  • Changing attributes of a file
  • Powering a virtual machine on or off
  • Creating or deleting a VMFS datastore
  • Expanding a VMFS datastore
  • Creating a template
  • Deploying a virtual machine from a template
  • Migrating a virtual machine with vMotion

When metadata changes are made in a shared storage environment, VMFS uses special locking mechanisms to protect its data and prevent multiple hosts from concurrently writing to the metadata.

Snapshot Formats on VMFS

When you take a snapshot, the state of the virtual disk is preserved, which prevents the guest operating system from writing to it. A delta or child disk is created. The delta represents the difference between the current state of the VM disk and the state that existed when you took the previous snapshot. On the VMFS datastore, the delta disk is a sparse disk.

Sparse disks use the copy-on-write mechanism, in which the virtual disk contains no data, until the data is copied there by a write operation. This optimization saves storage space.

Depending on the type of your datastore, delta disks use different sparse formats.

Snapshot Formats VMFS5 VMFS6
VMFSsparse For virtual disks smaller than 2 TB. N/A
SEsparse For virtual disks larger than 2 TB. For all disks.
VMFS5 uses the VMFSsparse format for virtual disks smaller than 2 TB.

VMFSsparse is implemented on top of VMFS. The VMFSsparse layer processes I/Os issued to a snapshot VM. Technically, VMFSsparse is a redo-log that starts empty, immediately after a VM snapshot is taken. The redo-log expands to the size of its base vmdk, when the entire vmdk is rewritten with new data after the VM snapshotting. This redo-log is a file in the VMFS datastore. Upon snapshot creation, the base vmdk attached to the VM is changed to the newly created sparse vmdk.

SEsparse is a default format for all delta disks on the VMFS6 datastores. On VMFS5, SEsparse is used for virtual disks of the size 2 TB and larger.

SEsparse is a format similar to VMFSsparse with some enhancements. This format is space efficient and supports the space reclamation technique. With space reclamation, blocks that the guest OS deletes are marked. The system sends commands to the SEsparse layer in the hypervisor to unmap those blocks. The unmapping helps to reclaim space allocated by SEsparse once the guest operating system has deleted that data. For more information about space reclamation, see Storage Space Reclamation in vSphere.

Snapshot Migration

You can migrate VMs with snapshots across different datastores. The following considerations apply:
  • If you migrate a VM with the VMFSsparse snapshot to VMFS6, the snapshot format changes to SEsparse.
  • When a VM with a vmdk of the size smaller than 2 TB is migrated to VMFS5, the snapshot format changes to VMFSsparse.
  • You cannot mix VMFSsparse redo-logs with SEsparse redo-logs in the same hierarchy.

Upgrading VMFS Datastores

You cannot upgrade a VMFS5 datastore to VMFS6. If you have a VMFS5 datastore in your environment, create a VMFS6 datastore and migrate virtual machines from the VMFS5 datastore to VMFS6.