Our Sponsors
Login Form



Connect ESXi to Windows Based NFS

Many people are looking for a low cost solution for external storage for their free ESXi server. In this article, I will describe how to use a Windows machine and Windows Services for UNIX (WSFU) version 3.5 to create an NFS share that can be mounted on an ESXi host for storage of Virtual Machines, ISOs, or backups. There are a lot of articles like this out there but none of them worked as advertised for me so I decided to write my own.

Because I’m thinking about using my NFS storage for backup purposes my NFS share is called esxi-backup. Call your share what you will.

There are 6 main steps in the process:

  1. Installing WSFU
  2. Enable SSH on the ESXi Server
  3. Obtaining copies of the ESXi Server passwd and group files to the WSFU server
  4. Configuring WSFU for accepting ESXi connections
  5. Sharing the Windows folder to NFS clients
  6. Creating an ESXi Datastore to mount the Window NFS Share.

 


1. Install WSFU

  • To install WSFU you must first download it from Microsoft. SFU Download
  • Install WSFU on the desired machine
  • Select Custom Install
  • Add NFS + Server for NFS and Authentication tools for NFS + user name mapping
  • After installation, open the windows services control panel applet and verify the service ‘User Name Mapping’ is setup to startup automatically and that the services is started.


Windows Services Screen

 

2. Enable SSH on the ESXi Server

  • Please note that enabling SSH on ESXi is not supported on production servers. Follow the instructions here

 

3. Copy the ESXi Server passwd and group files to Windows

  • Using a program like WinSCP or Veem fastSCP you need to navigate to the /etc directory on your ESXi server and copy passwd and group files to the WSFU server.
  • I copied the files to c:\SFU\esxi-files, that way I won’t forget what the file is for.


Windows Services Screen

 

4. Configure WSFU to accept connections from the ESXi Server.

  • On the Windows platform where WSFU was installed Click Start, Programs, Windows Services for UNIX, Services for UNIX Administration
  • Select User Name Mappings on the left hand side then configuration on the right had side.
  • Windows Services For Unix User Screen

  • Select the Password and Group files radio button
  • Then select browse for both the password and group files that you copied from the ESXi server
  • Select apply
  • Now Select Maps
  • Once the Maps window opens, select “Show User Maps”
  • Under Windows domain name, Select the windows PC where the users are located and then select List Windows Users, then select list Unix users
  • Select a local administrator user from the Windows Users on the left.
  • Under the Unix users Select the root account
  • Select Add
  • Then click apply (upper right)

Windows Services For Unix Maps Screen

 

5. Sharing the Windows folder for NFS compatibility

  • Right click the local folder you wish to share via NFS (mine is c:\VMware esxi backup)
  • Select NFS sharing
  • Type in the name for the share
  • Make sure allow anonymous access is NOT selected.
  • Windows NFS Sharing

  • Select permissions
  • Change type of access to “Read+Write” then select allow root access.
  • Windows NFS Sharing Permissions

 

6. Configure the ESXi Server to mount the Window NFS Share as VMFS

  • Open the VI client and select your ESXi Server
  • In the Configure tab choose Storage
  • Add storage, Network File System
  • In the Server Field enter the NFS server IP address or hostname.
  • In the Folder field enter the share name you created above (mine is esxi-backup)
  • I used esxi-backup for the Datastore name.

 

VI Add NFS

6a. Alternate NFS Configuration
This is an advanced configuration that requires the NFS server is on a separate IP network. I would only suggest this is you know what a separate subnet is and have one configured.

  • Open the VI client and select your ESXi Server
  • In the Configure tab choose Networking
  • Select Add networking
  • A new window will open, select VMKernel then select a vSwitch, then give the VMkernel an IP that is accessible via the NFS host.
  • Now open the storage option for this host
  • Click add storage, Network File System
  • In the Server Field enter the NFS server IP address or hostname.
  • In the Folder field enter the share name you created above (mine is esxi-backup)
  • I used esxi-backup for the Datastore name.

 If you are having issues with your firewall, this article, http://support.microsoft.com/kb/891760, should help you with the firewall issue. It's designed for Windows XP but the ports should be the same for all Windows operating systems.

Last Updated (Sunday, 12 December 2010 03:11)

 

Comments  

 
0 # Raúl 2010-12-27 12:06
Hi:

I there any way to do just the oposite? I mean, transform a datastore in a NAS, so I can connect from a Windows system to a shared folder in the datastore.

Thanks.
Reply | Reply with quote | Quote
 
 
0 # Tony 2010-12-27 12:35
Hi Raúl, This will depend on the type of NAS you have and how you have the NAS datastore created.

I created a home brew NAS running Ubuntu Server. I export /ESXi on my NAS via NFS to create an ESXi datastore. I also create a Samba Windows Share to /ESXi on the NAS. It's mounted to ESXi with NFS and to Windows with SMB. This allows me to access the ESXi VMs from ESXi or Windows. I do this to copy over appliances or create quick clones.

Is that what you are looking for?
Reply | Reply with quote | Quote
 
 
0 # panos 2011-02-19 05:16
Great guide!

Cheers mate!
Reply | Reply with quote | Quote
 
 
0 # drwoodberry 2011-03-14 13:40
I build multiple Virtual Center images using built in NFS. I have no issues connecting the ESXi hosts to the default image, but when I change the hostname of the base image and try to mount the NFS share, I cannot do so. Anyway to get this to work so that when the HOSTNAME of virtual center changes, the share is still accessiable?
Reply | Reply with quote | Quote
 
 
0 # Tony 2011-03-15 13:53
Hi drwoodberry, unfortunately, I have not run into this situation myself. Perhpas another reader will have an answer.
Reply | Reply with quote | Quote
 
 
0 # jojo 2011-08-09 03:32
hi, may i know how can i mount multiple esxi to one wsfu server??
Reply | Reply with quote | Quote
 
 
0 # hp 2011-10-08 18:27
I followed the directions and was able to mount the nfs volume as a datastore. I am running ESXi 4.1 and windows 2003 as my nfs server. When I copy my vmdk files after a snapshot to the newly mounted NFS datastore, I get mixed results. When I first tested it, was able to successfully copy a 16GB vmdk file repeatedly. But when I try this on a 40GB vmdk, the process fails half way. Troubleshooting the issue further, I found out that the NFS datastore gets dismounted and gets mounted again after the copying process fails. Unfortunately after trying quite a bit of time, still cant get this to resolve. Wanted to know if any one else experienced this issue.

Thanks
Reply | Reply with quote | Quote
 
 
0 # Tony 2011-10-08 19:31
I had similar issues with large files too. Try changing the Advanced NFS options. The two that helped me were
NFS.HeartbeatFreque ncy and NFS. HeartbeatDelta
VMware has a document that describes the NFS settings in detail if you search their site you should find it.
Reply | Reply with quote | Quote
 
 
0 # Sreeraj 2012-01-18 10:32
Excellent Tip. It worked for me !!
Reply | Reply with quote | Quote
 

Add comment


Security code
Refresh