The upcoming vSphere 8.0 Update 1 release includes a lot of exciting new features, some of which you can learn about by listening to either The Unexplored Territory and VirtuallySpeaking Podcasts, both of which covered the vSphere 8.0 Update 1 launch announcement. One of the highlighted core storage platform feature is the long awaited NFS capability that will allows users to select and isolate a specific VMKernel interface as shown in the screenshot below.
This actually reminded me of another interesting NFS capability that will also be part of the upcoming vSphere 8.0 Update 1 release, which is for ESXi to support multiple TCP connections for a single NFS v3 volume, also referred to as nconnect for those familiar with this NFS capability.
For those interested in this new NFS capability, it is important to note that this setting will initially only be configurable by using either the vSphere API or ESXCLI directly on an ESXi host.
vSphere API
The existing vSphere API createNasDatastore() has been updated to include a new connections property that specifies the number of connections to use. By default, you will be able to configure up to 4 connections, but you can also increase it up to 8 by updating the following ESXi Advanced Setting called /NFS/MaxConnectionsPerDatastore which can be modified by using ESXCLI.
Here is an example demonstrating the new vSphere API property using PowerCLI and attaching an NFS v3 Datastore:
$datastoreSys = Get-View (Get-VMHost 192.168.30.89).ExtensionData.ConfigManager.DatastoreSystem $nfsSpec = New-Object VMware.Vim.HostNasVolumeSpec $nfsSpec.RemoteHost = "192.168.30.6" $nfsSpec.RemotePath = "/mnt/nfs" $nfsSpec.LocalPath = "NFS" $nfsSpec.AccessMode = "readWrite" $nfsSpec.Type = "NFS" $nfsSpec.Connections = 4 $datastoreSys.CreateNasDatastore($nfsSpec)
Note: A newer version PowerCLI 13.1, which is compatible with vSphere 8.0 Update 1, will be required before you can access this new vSphere API property.
ESXCLI
The existing ESXCLI command to connect to an NFS datastore has also been updated to include a new argument called --connections (-c) that will allow you to specify the number of connections as shown in the example below.
esxcli storage nfs add -H 192.168.30.6 -s /mnt/nfs -v NFS -c 4
Finally, one additional tidbit to be aware of when using the ESXCLI option, is the ability to increase the number of connections after an NFS volume has already been mounted, which makes it very easy to take advantage of this new feature after upgrading to vSphere 8.0 Update 1.
Let's say the initial NFS mount has only a single connection and we want to increase that to 4, you run the following ESXCLI command to change the number of connections.
esxcli storage nfs param set -v NFS -c 4
Below is a screenshot of the above worklfow:
Note: If you wish to decrease the number of connections, you will need to first unmount the NFS volume and then remount with the desired number of connections.
Ray Parvaresh says
Nice article, William. How does the VMKernel binding differ than creating a VMKernel on the same subnet as your NFS server which in effect isolates the NFS traffic to that VMKernel via the routing table? Also how does the NFS multi connection differ than the NFS 4.1 multi-pathing? Is that the equivalent of NFS 4.1 multi-pathing under NFS V3? Thanks.
Joshua says
I was wondering the same thing
Florin Petrescu says
Same here!
Ray Parvaresh says
I suppose William doesn't read the comments, so perhaps anyone else can chime in?
William Lam says
Ray - Please don't assume you're the ONLY person asking for help or who've left a comment. I get inquiries/requests on a daily basis across any and every channel including my blog.
While I attempt to read and reply to as many comments/questions as I can, it's nearly impossible to keep up. So I'd ask folks to be patient and also have some respect when commenting.
In some cases, additional research is being done which you and others may not see, which is exactly this case. So don't assume you've not received a response, that its some how ignored or not seen.
For NFS multipath, we typically expect different IPs and for nConnect, it is a single IP. While nConnect is currently only supported with NFS v3 endpoints, support for NFS v4.1 is also being worked on in future
Joe says
You can mount and bind datastores on discrete vmkernels in the same subnet which can allow for proper load-balancing on flows from storage > host
Shaun Deeb says
It will be interesting to see the performance benefits from this setting.
I'm wondering if there will there be a requirement from the storage vendor side to support this?
Thanks
-S
Sascha says
That is one of the greatest anouncements we are waiting for years, thank you for sharing!
I heard nconnect is new on 8.0.1. Are you aware of any modifications to esxi 7 or is this a feature built only on 8?
Jonas says
I tried to make a script to mount datastores to an entire cluster with that parameter. Then I realized that it eventually tries to create the datastore anew for every host. If it already exists, it is renamed to (1).
I would need a way to set the connection parameters for existing datastores during mount. Else I'd have to script it using an ssh public key and esxcli, I guess.
William Lam says
Two options ... If the NFS volume is mounted, unmount and then re-add (as the vSphere API only supports adding a new volume). If not, you can still use PowerCLI and ESXCLI (SSH is not needed and shouldn't be), where you can then update the parameter for hosts that don't have NFS volume mounted
Jonas says
Thanks, yeah I figured it could be possible to use esxcli via PowerCLI, but also, IMO it shouldn't be necessary, if the API is completely exposed.
Much more important would be ways to save the desired connection settings to the Host/vSphere Profile, so we can apply it to all hosts consistently. Right now this is a hot mess in terms of compliance.
Kevin says
Hi William, thank you for this!
Is modifying (increasing) the number of connections to a NFS 3 datastore via nConnect disruptive to the workloads on that datastore? (on 8.0 U3)