Manage Learn to apply best practices and optimize your operations.

BETA: ESX 3.0 and VirtualCenter 2.0: Setting up NFS on Windows

As part of my research into NFS I took a look at Windows Services for UNIX (SFU). This allows you to run an NFS service on Windows (NFS Version 3 on TCP) which is compliant with ESX “IP Storage” options for datastores.

As part of my research into NFS I took a look at Windows Services for UNIX (SFU). This allows you to run an NFS service on Windows (NFS Version 3 on TCP) which is compliant with ESX “IP Storage” options for datastores. This means you can store ISOs, FLPs and Virtual Disks (in the monolithic format) on Windows File Server. With more than one ESX using the Windows Share/Datastore, advanced features like VMotion and DRS are possible without need for a SAN or iSCSI.

Alternatively, you could always install Linux and save yourself this hassle! 

Before I begin the setup instructions. Here are some useful links:

Homepage: Windows Services for UNIX
Download: Windows Services for Unix
KB: Setting Permissions In Microsoft Services for UNIX v3.0
KB: How to perform maintenance and ancillary tasks after a UNIX-to-Windows migration

Once you have downloaded SFU here’s how you setup the NFS component.

Installing SFU

These instructions are based on Windows 2003 without a Service Pack. I have also successfully made SFU on Windows 2000 with Service Pack 4. Windows does not allow unchallenged access to shares without authentication. As Windows and the ESX Host do NOT share a common end-user database, we need some method of “mapping” the users on ESX Host to Windows. The method I have chosen is a simple mapping of the accounts, using the files present on the ESX Host.

  1. Copy the passwd/group file from any one of your ESX servers, these are both held in /etc
  2. Extract the SFU package and run the MSI package.
  3. Choose a (C) Custom Installation
  4. Expand Authentication tools for NFS, User Mapping Service
  5. Next to the setupid option
  6. Under Local Sser Name Mapping Service, select (c) Password and Group files
  7. Type name and path for passwd/group files For example:
  8. Select the Windows Domain Note:
    In my case I used local user & groups on a Member Server
  9. Next, accept the location for the install…Note:
    Watch the status bar, check your email, make a cup of coffee, wonder how long you spend watching status bars… oh, and at the end of this – reboot your Windows/NFS Server 


Creating a User Mapping (Between Administrator and Root)

  1. From the Start Menu, Windows Services for UNIX 
  2. Run the MMC, Services for UNIX Administration
  3. Select User Name Mapping node
  4. Choose Maps option and under Advanced Maps, click Show User Maps
  5. Click List Windows Users button – and select Administrator
  6. Click List Unix Users button - and Select root
  7. Click the Add button
  8. At the top of the console choose the Apply button

Sharing out of a folder:

  1. On the Windows/NFS Server, right-click a folder, and choose Share
  2. Choose (c) Share this folder
  3. Select NFS Sharing tab
  4. Choose (c) Share this folder
  5. Click the Permissions button, Select X Allow root access
  6. Change the Type of Access to Read-Write
  7. Choose OK to exit sharing dialogs   

Watch out foR CaseSensitivity on your sHaReNaMeS. Make them all in lower-case and use no spaces. 

Confirming the Windows/NFS Server is functioning

There are a number of tools we can use at the Windows/NFS server or at the Service Console to see if things are working before adding in the NFS Share as IP Storage in the VI Client.

rpcinfo (lists listening ports within Unix/Linux/SFU systems)
showmount (lists available “exports” or NFS Shares either locally or remotely)
ls -l (lists files and shows effective permissions)
mount (in combination with a mount point we can make a test connection to the Windows/NFS and confirm we can create files)

On the Windows Server:
rpcinfo -p (lists listening ports on the server, notice TCP, NFS v3, Port 2049)
showmount -e 
ls -l

On the ESX Host/Service Console:
showmount -e (same as above but remotely, you can use an FQDN/hostname if you have set it up)
The instructions below create a mount point, mounts the remote NFS Share, lists the files and uses redirection > to create a test file

mkdir /test
mount /test
ls -l /test
dir > /test
umount /test
rmdir /test

Dig Deeper on VMware ESX and ESXi administrative tips

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.