VMware

Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Many choose to use NFS as opposed to iSCSI in their VMware vSphere environments.  NFS has a lot of benefits and use cases particularly when we look at the efficiency of NFS.  With NFS there is no encapsulation that needs to take place as there is with iSCSI.  Like iSCSI, NFS can use an existing IP network as well.  So, starting off simple here, let’s take a look at how to configure FreeNAS 9.10 NFS VMware ESXi 6 datastore.

Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

The specific version of FreeNAS I am using is 9.10.2 U3 and is the most recent GA version on the FreeNAS site at the time of this writing.  I am not covering here the setup of FreeNAS in general.  You will want to provision your storage and your network connectivity on the appliance itself.  For the purposes of the post, I am running FreeNAS as a VM which is a great way to play around with iSCSI and NFS in a lab.  I have setup a management IP as well as another interface that I have bound for NFS connectivity.

To turn on NFS, you need to go to Services and toggle the switch to ON for NFS.  Also, once you flag on the switch, click on the “wrench” icon to configure the NFS service.

freenas_nfs01

Once we click on the wrench icon, we get another box with more we can configure.  Really, for basic NFS setup, all we really need to set here is select which IP address we want to bind to the service.  So we check the IP under the Bind IP Addresses.

freenas_nfs02

Now, let’s setup our storage we are going to use for NFS.  Go to Storage and click the Volume Manager button.

freenas_nfs03

Here we name our volume. Then add the available disks we want to use by clicking the “plus” sign next to the drive.  Click the Add Volume button.  Note this will erase any existing data.

freenas_nfs04

Next, we go to Sharing which is where we actually setup our NFS share.  Go to Sharing >> UNIX (NFS) >> Add Unix (NFS) Share.
freenas_nfs06

Click the Browse button.

freenas_nfs07

When we click the Browse button, we can browse to our volume mount.  Click the Advanced Mode button.

freenas_nfs08

Under the Advanced Mode view, we can specify the Authorized networks as well as Maproot User which is the credentials of the specified user used for remote access.  I have root selected here.

freenas_nfs09

Now we see our path specified in the NFS share.

freenas_nfs09a

VMware Setup

Next, let’s take a look at setting up our VMware configuration to connect to the NFS share.  We need to create a vmkernel port IP address which will be used to connect to the NFS server and share.  I am simply using the existing standard vSwitch on which I have iSCSI vmkernel port groups already provisioned on for the purposes of the lab.  So we create a new network and select VMkernel as the connection type.

freenas_nfs10

Here we name the VMkernel port group.

freenas_nfs11

Next, we need to assign an IP address that has connectivity to the NFS server and share.

freenas_nfs12

Finally, we finish out of the add network wizard.

freenas_nfs13

Now, we simply need to Add Storage to our server.  Click the Add Storage button in the Storage configuration.

freenas_nfs16

Next, we select Network File System.

freenas_nfs17

Next, we point our VMware ESXi host to the NFS server IP and also the folder which we want to point to.  The folder should look familiar as this is the path in the Add Unix (NFS) share configuration.

freenas_nfs18

Finally, we finish out of the Add Storage wizard.

freenas_nfs19

Alas, if we check our storage configuration, we should see our new NFS datastore mounted.

freenas_nfs20

Thoughts

NFS is a great lightweight protocol that can be effectively used for creating VMware NFS datastores.  As shown here, to configure FreeNAS 9.10 NFS VMware ESXi 6 datastore only requires a few steps on both sides and is simple and quick to complete.  FreeNAS is a great piece of software to run and test real storage protocols and applications in a lab environment and otherwise.  So, grab a copy of FreeNAS and start playing around in your home lab with NFS and iSCSI.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.