This tutorial shows how to connect a Windows Server directory to a VMWare ESXi host as a datastore using NFS.
Important. VMWare ESXi does not support SMB shares (\\server\share) as a datastore. The only supported way to use a Windows Server folder as storage is via NFS.
Supported Datastore Types in ESXi
ESXi supports several datastore and storage technologies, including:
- VMFS โ for local and block storage such as Fibre Channel and iSCSI
- NFS โ for network file storage
- vSAN โ VMware’s software-defined storage solution that aggregates local disks across ESXi hosts
- vVols (Virtual Volumes) โ storage architecture that allows storage systems to manage VM storage at the virtual-disk level
Note that for this article, NFS is the relevant option because ESXi cannot use a Windows SMB share directly as a datastore.
Install and Configure Microsoft NFS Server
Windows Server includes a built-in NFS Server feature that allows you to share directories over NFS and use them as storage for ESXi.
Important. Using Windows Server NFS as an ESXi datastore should generally be limited to lab, testing, and non-critical environments. Before using it in production, you should check if the specific storage config is supported for your ESXi/vSphere version and appears in the applicable VMware/Broadcom Storage Compatibility Guide. Windows Server’s built-in NFS server is not a certified storage array listed in the VMware/Broadcom HCL, so you should not treat this config as an equivalent to a validated enterprise NAS/SAN platform.
Configuring Microsoft NFS storage services
Note that you must install the NFS Server role on Windows before creating a datastore.
First, we need to configure NFS share in Windows Server and then connect it as an NFS datastore on an ESXi host to store virtual machine files. We already have a Windows machine configured with the File and Storage Services role. To install NFS Server feature:
- Open Server Manager console and select Manage > Add Roles and Features.
- On the Server Roles tabs expand section File and Storage Services > File and iSCSI Services.

- Tick the item Server for NFS.
- After installation is finished, click on โCloseโ.

Tip. You can install Server for NFS Features even easier with a single Powershell command:
Install-WindowsFeature FS-NFS-Service
Next you need to create a new Windows directory that will be used as an NFS share that will be mounted as an ESXi datastore. For example:
D:\NFS\VMWare
You need to avoid using system drives like C:\ for NFS storage. We don’t recommend you to do this because:
- This can impact the operating system performance
- It makes backup and maintenance tasks harder to perform
- It mixes system and VM data
Tip. The best practice is to use a separate volume or disk (for example, D:\ or a dedicated storage LUN) for NFS shares.
Switch to the Server Manager console and go to File and Storage Services > Shares. Run New Share Wizard (Tasks > New Share) and then select NFS Share-Quick.

Specify the folder path (for example, D:\NFS\VMWare) and set a share name. In this example we are using share name nfs. In this case, the full NFS path (remote path to the share), which can be used by Unix/Linux clients, looks like this: srv-fs01:/nfs

On authentication method page disable Kerberos authentication methods and select only โNo Server authenticationโ and โEnable unmapped user accessโ.

Critical NFS settings that are required for ESXi
Make sure the following options are configured correctly:
- No Server Authentication (ESXi does not support Kerberos for NFS in this scenario)
- Enable unmapped user access (required to allow ESXi to access files)
- Allow root access (needed for proper VM file operations)
- Read/Write permissions (ESXi must have write access to the share)
To configure Windows share permissions enter your ESXi host FQDN name / IP address, select Read/Write permissions and tick Allow root access for NFS sharing.

You can create an NFS share and restrict access to it via PowerShell (not command prompt window):
New-NfsShare -Name "NFS" `
-Path "D:\NFS\VMStore" `
-AllowRootAccess $true `
-Permission ReadWrite `
-Authentication sys
Grant-NfsSharePermission `
-Name "NFS" `
-ClientName 192.168.1.111 `
-ClientType Host
Before running the command above, you need to ensure you have customized the parameters below based on your environment:
| Parameter | What it means | What to set |
|---|---|---|
| -Name | Logical name of the NFS share | Any name (e.g. NFS-VMStore) |
| -Path | Local folder path on Windows Server | Use a dedicated disk (e.g. D:\NFS\VMStore, not C:\) |
| -ClientName | ESXi host address | Set your ESXi IP or hostname |
| -Permission | Access level for the share | Use ReadWrite for datastore |
| -AllowRootAccess | Allows root access for NFS | Root access is commonly required for proper datastore operations and is recommended when using ESXi with Microsoft NFS shares. |
Important. You need to ensure:
- You are using a dedicated disk (and it’s not system drive C:)
- You specified the correct ESXi host IP
- You allowed a ReadWrite access
- You have enabled root access (recommended for ESXi compatibility and proper VM file operations)
Security note. You should not allow access from “All machines”. Remember to restrict NFS access to specific ESXi host IP addresses always.
Tip. Also you can restrict access to NFS service using Windows Firewall by denying access except the required IP address or subnet.
Verify NFS Share Availability
Before creating the datastore, you need to verify that the NFS share is accessible from the ESXi host. On Windows Server, use the command:
Get-NfsShare
You need to check that:
- the share exists;
- the ESXi host IP address is allowed;
- Read/Write permissions are configured.
This can save troubleshooting time if the datastore mount fails later.
The following command displays the hosts and permissions configured for the NFS share:
Get-NfsSharePermission -Name NFS
Connect the Windows share to VMWare ESXi Host
So we have created a new network NFS share on Windows Server. It remains to connect it as a datastore to VMWare host.
- Login to your vSphere server / ESXi host and select your host. From Action menu select Storage > New > Datastore on your existing or new VMWare ESXi host.

- Select NFS as a datastore type.

- Select NFS 4.1 if you are using Windows Server 2022 or later. While ESXi supports both NFS 3 and NFS 4.1, many admins still prefer NFS 3 when using Microsoft Server for NFS because it is the most widely tested and compatible config. If your NFS server is running Windows Server 2019, 2016, 2012 R2, or earlier, you should use NFS 3 because Microsoft Server for NFS does not support NFS 4.1 on those versions.
Note. NFS 4.1 is supported by Microsoft Server for NFS starting with Windows Server 2022. Earlier Windows Server versions support NFS 2 and NFS 3 only. ESXi 6.0 and later support NFS 4.1. If you are using Windows Server 2019, 2016, or 2012 R2 as the NFS server, use NFS 3 when creating the datastore.
- Give your Datastore a name (WindowsNFS), enter NFS Folder (/nfs) and NFS server name (IP address or DNS name).

After successfull adding the NFS datastore, it appears in the list of available host datastores. You can use this datastore (yet empty) to place the VM files or store operating systems ISO images.

Important. Note that ESXi will not be able to connect to the NFS share unless the required ports are open. You need to allow NFS traffic on Windows Firewall:
New-NetFirewallRule -DisplayName "NFS Server" `
-Direction Inbound `
-Protocol TCP `
-LocalPort 2049 `
-Action AllowNew-NetFirewallRule -DisplayName "NFS Server UDP" `
-Direction Inbound `
-Protocol UDP `
-LocalPort 2049 `
-Action Allow
For NFS 4.1, TCP port 2049 is typically sufficient. NFS 3 uses additional RPC services, including the portmapper/RPCbind service on TCP/UDP 111 and the NFS mount service (mountd), which may use dynamically assigned ports. In case you are with environment where firewall rules must be tightly controlled, you should config fixed RPC ports for the required NFS services and allow those ports through the firewall.
Tip. Make sure that vmkernel port is configured on your ESXi server.
Troubleshooting NFS Datastore Mount Issues
If the datastore cannot be mounted, you should verify the following:
- The NFS Server role is installed.
- The NFS share exists and is exported.
- The ESXi host IP address is allowed.
- Read/Write permissions are configured.
- Root access is enabled.
- Windows Firewall allows NFS traffic.
- DNS resolution works correctly if you use hostnames instead of IP addresses.
- The ESXi vmkernel adapter can reach the NFS server.
VM file locking issues. Windows Server NFS may have compatibility limitations with NFS file-locking semantics. In some environments, this can cause problems with VM file locks/operations (such as powering on, migrating, or creating snapshots of VMs). If you experience .lck-related errors or VM operations fail unexpectedly, you need to check the NFS locking behavior and VMware logs. For critical workloads, you should use VMware-supported storage rather than relying on Windows Server NFS.
Wrapping up
Windows Server can be used as NFS storage for VMware ESXi when dedicated NAS/SAN infrastructure is not available.
In order to successfully mount a Windows folder as an ESXi datastore:
- Install the Server for NFS role
- Create and config an NFS share
- Restrict access to specific ESXi hosts
- Verify permissions and firewall settings
- Mount the share as an NFS datastore in ESXi
- The selected NFS version is supported by both ESXi and the Windows Server NFS implementation.
While this method works well for labs, test environments, and small deployments, we generally recommend dedicated NAS/enterprise storage solutions for production workloads.
Architecture note. A Windows Server NFS share can also introduce a single point of failure. If the Windows NFS server or its storage becomes unavailable, ESXi hosts may lose access to the datastore and the VM files stored on it. Unlike enterprise storage solutions with redundant controllers and multipathing, a single Windows NFS server does not provide the same level of storage-path redundancy. For critical production workloads, you should use redundant enterprise storage with appropriate multipathing and failover capabilities.
Why canโt I use a Windows SMB share as a datastore in ESXi?
VMware ESXi does not support SMB shares (\server\share) as datastores. The only supported way to use a Windows Server folder as storage is via NFS.
Which datastore types are supported in ESXi?
ESXi supports:
- VMFS (local disks, iSCSI, Fibre Channel)
- NFS (network storage)
For Windows Server integration, only NFS is applicable.
Is using NFS on Windows Server recommended for production?
NFS storage on Windows Server is generally recommended for:
- testing environments
- on-critical production workloads
What are the critical NFS settings for ESXi?
The following settings are required:
- No Server Authentication (Kerberos not supported)
- Enable unmapped user access
- Allow root access
- Read/Write permissions
Without these, ESXi may fail to access the datastore.
How do I restrict access to the NFS share?
You should never allow โAll machinesโ access.
Instead:
- specify only ESXi host IP or hostname
- optionally restrict via Windows Firewall to specific IPs/subnets


