Virtualizationesxi 7esxi 8vCenterVMware

Configure NFS Datastore on VMware ESXi with a Distributed Switch

Configure NFS Datastore on VMware ESXi with a Distributed Switch

In VMware environments, using NFS storage is one of the simplest ways to provide shared storage for ESXi hosts. When combined with a VMware Distributed Switch (VDS), it offers better network management, traffic isolation, and scalability across multiple ESXi hosts.

This tutorial will guide you through configuring Windows Server 2022 as an NFS server, creating a dedicated VMkernel port on an ESXi host (192.168.91.128), and connecting it to your NFS datastore via VMware Distributed Switch (VDS) managed by vCenter (192.168.91.130).

Prerequisites

Before you begin, ensure the following:

ComponentIP AddressNotes
vCenter Server192.168.91.130Already installed, managing ESXi hosts
ESXi Host192.168.91.128Added to vCenter
Windows Server 2022192.168.91.129Will act as NFS server
NetworkSame subnet 192.168.91.0/24Ensure connectivity between ESXi and NFS

Step 1: Install NFS Server on Windows Server 2022

Open Server Manager

Click Manage → Add Roles and Features. Select Role-based or feature-based installation

Select your server (192.168.91.129)

Expand File and Storage Services → File and iSCSI Services. Check Server for NFS. Click Next → Install and Restart if prompted

Explanation:
The Server for NFS allows ESXi hosts to connect to shared folders over the network using the NFS protocol.

Step 4: Create a VMware Distributed Switch (VDS)

Open Web broswer and log in to vCenter (192.168.91.130). Type username and password and hit login button.

Click here to download VMware vCenter 8.0

VMware vCenter

Go to Datacenter → Create a Distributed Switch

Configure NFS Datastore on VMware ESXi with a Distributed Switch

Click on Action and select, and select Distributed Switch. click on New Distributed Switch.

Configure NFS Datastore on VMware ESXi with a Distributed Switch

Name: VDS-Storage

Configure NFS Datastore on VMware ESXi with a Distributed Switch

Version: Use latest supported by your ESXi host Add ESXi host (192.168.91.128) to the VDS.

Assign uplinks (physical NICs) for redundancy (e.g., vmnic0, vmnic1), and Click Finish

Explanation: A Distributed Switch allows VMkernel and VM traffic to be centrally managed and consistent across multiple hosts.

Step 5: Create a Dedicated VMkernel Port for NFS on VDS

In vCenter → Networking → VDS-Storage → VMkernel Adapters → Add Host Networking

Select VMkernel Network Adapter. Choose VDS-Storage as the switch

Configure:

SettingExample
Network LabelNFS-Storage
VLAN ID0 (or your storage VLAN)
IP Address192.168.91.131
Subnet Mask255.255.255.0
GatewayLeave blank

Leave services unchecked (NFS does not require enabling vMotion, Management, etc.). Assign uplinks to physical NICs (vmnic0 and vmnic1 for redundancy). Finish configuration

Step 6: Test VMkernel Connectivity

SSH into ESXi host (192.168.91.128) and run:

vmkping 192.168.91.129

Successful ping confirms connectivity between VMkernel NIC and NFS server. Ready to mount NFS datastore.

Step 7: Mount NFS Datastore on ESXi

  1. Go to vCenter → Storage → New Datastore
  2. Select NFS
  3. Fill details:
FieldValue
NameWin2022-NFS
NFS Server192.168.91.129
Share Path/NFS-ESXi
NFS VersionNFS 3

Click Next → Finish and Verify datastore appears in vCenter → Storage

Conclusion

Using a Windows Server 2022 NFS share with a VMware Distributed Switch ensures:

  • Optimized storage performance
  • Network isolation for NFS traffic
  • Centralized network management for multiple ESXi hosts

This setup is ideal for home labs, SMBs, and enterprise labs using vSphere and vCenter.

By creating a dedicated VMkernel port for NFS on a Distributed Switch, you ensure reliability, scalability, and best practices compliance for VMware storage.

FAQ

Why should multiple ESXi hosts use the same VDS?

Using the same VDS guarantees consistent VMkernel, VLAN, and NIC settings across all hosts. This prevents storage disconnections, improves vMotion, and ensures stable high availability.

Can I migrate VMkernel ports to the VDS without downtime?

Yes. vSphere supports live migration of VMkernel adapters from a standard switch to a VDS as long as the host maintains IP connectivity and at least one NIC stays active.

What NIC configuration is recommended for shared storage?

VMware recommends using two or more physical NICs dedicated to storage traffic, configured with NIC teaming and optionally LACP for redundancy and throughput.

Can I use the same VDS for vMotion and storage?

Yes, but not recommended. Storage should have dedicated uplinks to prevent congestion and improve performance.

Why is VDS better than vSS for shared storage?

A Distributed Switch eliminates configuration drift and ensures every host uses identical settings, which is crucial for stable storage and vMotion networking.

How do I verify storage connectivity after adding hosts to VDS?

vmkping IP Address

80%
Awesome
  • Design

1 Comment

Leave a Response

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock