VMware ESXi and vSphere Cluster Management
NFS Datastores for VMware ESXi: Overview and Core Concepts
Learn how VMware ESXi uses NFS v3 storage from a NAS, how exports become shared datastores, required permissions, setup concepts, and troubleshooting.
NFS, or Network File System, is a file-sharing protocol that lets a client access files stored on a remote server over a network. VMware ESXi includes an integrated NFS client, so an ESXi host can use file-based storage supplied by a NAS or another NFS server through a standard TCP/IP network.
This differs from directly attached storage. With directly attached storage, disks are connected locally to a server. With NFS, the storage remains on a separate system and ESXi accesses files through the network.
What NFS Means in an ESXi Environment
An ESXi host is a VMware hypervisor server that runs virtual machines. An NFS server provides directories to clients through NFS. In many environments, the NFS server is a NAS device, which is network-attached storage that provides file-access services.
The basic relationship is:
- The NAS or NFS server owns the physical storage.
- The server creates and publishes an NFS export, which is a directory made available for remote clients.
- The IP network carries communication between the ESXi host and the server.
- ESXi uses its built-in NFS client to mount the export.
- ESXi presents the mounted export as an NFS datastore.
For this overview, ESXi communication with the NFS server uses NFS version 3, commonly written as NFS v3.
Conceptual NFS Topology
The following topology shows two ESXi hosts reaching the same NAS export over TCP/IP. The export is mounted on both hosts and appears as one shared NFS datastore.
+----------------+ +----------------+
| ESXi Host 1 | | ESXi Host 2 |
| NFS client | | NFS client |
+--------+-------+ +--------+-------+
\ /
\ /
+--------------------------------------+
| TCP/IP network |
| NFS v3 communication |
+------------------+-------------------+
|
+---------v----------+
| NAS / NFS Server |
| NFS export |
| /production-share |
+---------+----------+
|
Shared NFS datastore
mounted by both ESXi hostsThe important point is that both hosts must reach and mount the same export if the datastore is intended for shared-storage operations.
NAS and the NFS Server Role
NAS stands for Network Attached Storage. A NAS device combines storage hardware with network file-sharing services. When it provides NFS, it acts as the NFS server.
The NAS administrator creates a directory, enables the NFS service, and publishes the directory as an export. The administrator also defines which client addresses or networks may access it and whether that access is read-only or read/write.
ESXi does not treat the NAS as a local disk. Instead, it sends file operations across the IP network to the exported directory. Network reachability, export rules, and server-side permissions are therefore essential parts of storage availability.
NFS Environment Components and Responsibilities
What Is an NFS Datastore?
An NFS datastore is an NFS export mounted by ESXi and used as a storage location for virtual infrastructure files. The export is created on the NFS server; the datastore is the ESXi representation of that remote file-based storage.
If one ESXi host mounts the export, it can use the datastore locally from that host's point of view. If multiple ESXi hosts mount the same export and each host has consistent access, the datastore becomes shared storage for those hosts.
For example, a NAS might export a directory named /production-share. ESXi Host 1 and ESXi Host 2 can both mount that export. Each host then sees a datastore representing the same underlying directory and can access the virtual machine files stored there.
What NFS Datastores Store
An NFS datastore can contain many types of vSphere-related content, including:
- Virtual machine configuration files.
- Virtual machine virtual disk files.
- Virtual machine templates.
- ISO installation media.
- Other virtual infrastructure files and datastore content.
For example, an administrator might store a production virtual machine, a reusable VM template, and ISO files on the same NFS datastore, subject to the organization's capacity, performance, and protection policies.
NFS Datastores Compared with VMFS
VMFS is VMware's clustered filesystem. VMFS and NFS datastores can both serve as storage locations for virtual machines, but they use different storage-access models.
Requirements for a Shared NFS Datastore
Creating a shared NFS datastore is a coordinated task between the NFS server and ESXi:
- Create a directory intended for ESXi storage on the NAS or NFS server.
- Enable the NFS service if it is not already running.
- Publish the directory as an NFS export.
- Authorize the applicable ESXi host IP addresses or storage network.
- Grant the required read/write access.
- Ensure the ESXi hosts can reach the NFS server over TCP/IP.
- Add the server address and export path as an NFS datastore on an ESXi host.
- Mount the same export on every ESXi host that requires shared access.
- Confirm that each participating host recognizes the datastore and can use it consistently.
The NAS configuration is vendor-specific. Use the NAS manufacturer's administration interface or the appropriate NFS server configuration method to create the directory, enable the service, publish the export, and define permissions. The ESXi-side task is to add the server export as an NFS datastore rather than to format the export as VMFS.
NFS Datastore Preparation Checklist
NFS Permissions and Access Control
NFS permissions are enforced on the NAS or NFS server, not solely inside vSphere. Adding a datastore in ESXi does not override export rules on the server.
ESXi hosts require both read and write access to the export. The NFS export must also permit the required access for the root account, the privileged system account used by ESXi for relevant storage operations. If root-level access is restricted by the server's export policy, the datastore may fail to mount or may not support normal file operations.
Export access should be limited to authorized ESXi host addresses or an appropriately controlled storage network. Avoid publishing an ESXi datastore export broadly when the NAS can restrict access to the intended hosts.
vSphere Feature Compatibility
Shared NFS storage can support several vSphere capabilities when the broader requirements are satisfied:
- vMotion: A running virtual machine can move between hosts when the destination host can access the virtual machine's storage and all other vMotion requirements are met.
- DRS: Distributed Resource Scheduler can use shared datastore access as part of automated workload placement and balancing. Hosts need consistent access to the relevant virtual machine files.
- HA: vSphere High Availability can use shared storage access when recovering virtual machines after a host failure. The participating hosts must be able to access the required files.
A shared NFS datastore does not automatically enable every feature. Availability also depends on the vSphere cluster design, host networking, virtual machine compatibility, feature configuration, and applicable vSphere licensing.
Practical Examples
Single Shared NFS Datastore
A NAS server exports a production directory. Two ESXi hosts mount that same export, so the directory appears as one shared NFS datastore on both hosts. Both hosts can access the same virtual machine files, provided the export permissions and network paths are correct.
Mixed Datastore Content
An administrator places virtual machine files, a reusable template, and ISO installation media on an NFS datastore. This demonstrates that an NFS datastore can hold multiple types of vSphere-related content rather than only virtual disks.
Permission Dependency
An export can exist on the NAS and still be unusable. If the export does not authorize an ESXi host for read/write access or does not permit the required root account access, ESXi may fail to mount the datastore or may be unable to create and change files.
Shared Storage for Cluster Operations
Several hosts in a vSphere cluster mount the same NFS datastore. Virtual machines stored there remain accessible to the hosts participating in shared-storage operations. The common datastore is a foundational storage requirement for capabilities such as vMotion, DRS, and HA, but other feature prerequisites still apply.
Troubleshooting NFS Datastores
The ESXi Host Cannot Mount the NFS Datastore
Likely causes include an incorrect NFS server address, an incorrect export path, a disabled NFS service, missing network connectivity, or an export that does not authorize the ESXi host.
- Verify IP reachability on the intended storage network.
- Confirm the NFS service is enabled on the NAS or server.
- Check the server address and export path.
- Review export rules for the ESXi host address or subnet.
The Datastore Mounts but Files Cannot Be Created or Changed
The export may be read-only, the ESXi host may lack write permission, or the required root account access may not be allowed.
- Confirm that the export is configured as read/write.
- Review NAS-side permissions and export options.
- Confirm that the ESXi host is authorized for the required root-related access.
One ESXi Host Sees the Datastore but Another Does Not
The export may have been mounted on only some hosts, or the NFS server may authorize only some host addresses. A host-specific storage-network or routing problem is also possible.
- Compare datastore mounts across all intended hosts.
- Compare each host's IP address with the NFS export authorization rules.
- Validate network connectivity from every host to the NFS server.
Shared-Storage Cluster Features Are Unavailable
Not all participating hosts may have access to the same datastore, the virtual machine files may be on non-shared storage, or other vSphere cluster and feature requirements may be incomplete.
- Verify common datastore visibility on all relevant hosts.
- Verify that the virtual machine resides on the shared NFS datastore.
- Review the wider vSphere configuration for vMotion, DRS, or HA prerequisites and licensing.
Exam-Relevant Notes
- NFS is a file-sharing protocol, while directly attached storage is locally connected storage.
- A NAS commonly acts as the NFS server.
- An NFS export is a server-side directory; an NFS datastore is that export mounted and represented in ESXi.
- ESXi includes an integrated NFS client and communicates with the NFS server over TCP/IP.
- NFS v3 is the protocol version identified for this overview.
- Multiple ESXi hosts must mount the same export for it to function as shared storage among those hosts.
- Read/write permissions and required root account access are controlled on the NFS server or NAS.
- Shared NFS storage can support vMotion, DRS, and HA when the broader vSphere configuration and licensing requirements are also satisfied.
For a related introduction to the protocol itself, see NFS Network File System overview.