WS2012 Storage - NFS Server - Configure NFS for VMware vSphere 5.1 Home Lab

The following procedure show how to setup a NFS Server hosted on Windows Server 2012 for backend storage of my VMware vSphere Server 5.1 Home Lab.

You can also check my post on Creating an iSCSI Target Server on Windows Server 2012.


In the following post I will talk about the following points:
  • Terminology
  • Using PowerShell
    • Add the Role NFS Server Feature on Microsoft Windows Server 2012
    • Create the Share and Set the NFS permissions
    • Add the NFS datastore to VMware vSphere 5.1
  • Using the GUI (Graphical User Interface)
    • Add the Role NFS Server Feature on Microsoft Windows Server 2012
    • Create the Share and Set the NFS permissions
    • Add the NFS datastore to VMware vSphere 5.1

NFS Storage

Quick overview of my NFS Service architecture in my Home Lab


Before I start, if you are not familiar with NFS, W2012 or vSphere 5.1, please check the following links:

Using PowerShell

Adding the "Server for NFS" Role on Windows Server 2012

First you will need to add the Windows Feature to handle the NFS Service and shares.
Launch PowerShell as Administrator and run:
Add-WindowsFeature "FS-NFS-Service"
(Add-WindowsFeature on technet)

# Get a list of all the Cmdlets available for this module
Get-Command -Module NFS

Windows Server 2012 was delivered with PowerShell 3.0.
This new version comes along with a dedicated NFS Module!! Find above the Cmdlets available.

Creating a Share and Set the NFS Permissions

# Now we need to create a new share and set the permission to allow client
# to connect to it. Here I used a folder I created E:\NFS_MOUNT  
New-NfsShare -Name "NFS_MOUNT" -Path "E:\NFS_MOUNT" -AllowRootAccess $true -Permission Readwrite -Authentication all
(New-NfsShare on Technet)

Add the NFS Share to your vSphere Lab

Finally we will need to add the new NFS share in our VMware vSphere host.
$VMHOST = "" # VMware vSphere host where to create the datastore
$NFSDatastore = "FILESERVER01-NFS_MOUNT" # name that you want to give $NFSServer = "FILESERVER01.fx.lab" # ip of fqdn of the NFS Server $NFSSharename = "NFS_MOUNT" # Share created on the NFS Server New-Datastore -Nfs -VMHost $VMHOST -Name $NFSDatastore -NfsHost $NFSServer -path $NFSSharename

Using Graphical User Interface (GUI)

Adding the "Server for NFS" Role on Windows Server 2012 
Select the feature Server For NFS, under File and Storage Services / File and iSCSI Services

Once you click on Server For NFS, you will be prompted to add the required components,
Continue by clicking on Add Features

Select INSTALL on the review page.

When the installation is completed, click on Close.

Creating a Share and Set the NFS Permissions on Windows Server 2012(GUI)
Here I created a folder on the E: Drive called NFS_MOUNT.
Right click on the folder and select Properties, you will see a new tab called NFS Sharing
Click on Manage NFS Sharing

On the NFS Share Permission windows, change the Type of access to READ-WRITE,
and Check the Allow root access propertie.
Click OK to complete.

And you are done! Under the "Services for NFS Sharing" area
you can find the information about your current NFS share.

Add the NFS Share to your vSphere Lab (GUI)

In vSphere Client, (select your ESXi/Configuration/Storage), Select Add Storage, Select Network File System
Enter the information of the NFS Server.

Click on Finish to complete the task.

And that's it... leave a comment if you have any question.


  1. I'm not sure if you already have a backup solution in place for your home lab, but if not, Unitrends is now in Virtual Appliance form and two FREE versions are available:

    Free Edition
    - Protect 4 VMs (VMware or Hyper-V)
    - Instant recovery of virtual machines.
    - File-level recovery of files and folders.
    - Rotational archiving to disk, tape, NAS and SAN.
    - Automated backup scheduling with flexible strategies.

    NFR Edition
    - Eligibility: VCPs, VCIs, vExperts, MVPs, MCPs
    - Protect 2 sockets and 2 physical servers
    - Phone, email and online support
    - 1 year expiration (renewable along with certification)

    Both are available for download here: http://www.unitrends.com/unitrends-enterprise-backup/download?src=LazyWinAdmin

    1. Thanks Jenn! I'm looking forward to test your solutions.

  2. I know you use Windows 2012 NFS Datastore for OS and Apps iso. Did you ever host or vmotion a vm to this NFS datastore? I can't get it to work without some kind of error mid way.

    1. Hey there, I never worked with VM hosted on NFS,What error did you get ? Did you check permissions/freespace ?

  3. My experience with trying to get vsphere 5.1 to use a NFS datastore provisioned via server 2012 or 2012R2 is that it simply doesn't work. YES you can create it. YES vsphere will see it and mount it. But try to do ANYTHING that puts I/O pressure on it (deploying a VM from a template or storage vMotion a VM to it) and it simply pukes and times out. It is simply unusable. Even as an ISO datastore, the read performance really sucks. It's unbearably slow.

    It IS a problem with MS NFS implementation because I can use that same server and present Datastores via iSCSI and none of the symptons above manifest. I can deploy VMs from templates and do storage vmotion just fine.

    I've found several blog posts such as this that never went beyond simply provisioning the NFS datastore on server 2012 (R2). Why? I think it's a disservice because people read this and then assume it works and, like me, spent countless hours going over the steps over and over and doing a bunch of research to reach the same conclusion as I did, NFS datastores provisioned on server 2012 simply won't play nice with vSphere.


    1. Thanks for your comment Jose.
      I have to admit, I did not try to run high I/O VM when i was using NFS volume.
      It worked well as an ISO repository in my lab. I dont remember having great performance, but not super slow either.

      Thanks again for your comment, appreciated.