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. Install WSFU
2. Enable SSH on the ESXi Server
3. Copy the ESXi Server passwd and group files to Windows
4. Configure WSFU to accept connections from the ESXi Server.
5. Sharing the Windows folder for NFS compatibility
6. Configure the ESXi Server to mount the Window NFS Share as VMFS
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.
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:
- Installing WSFU
- Enable SSH on the ESXi Server
- Obtaining copies of the ESXi Server passwd and group files to the WSFU server
- Configuring WSFU for accepting ESXi connections
- Sharing the Windows folder to NFS clients
- Creating an ESXi Datastore to mount the Window NFS Share.
1. Install WSFU
- To install WSFU you must first download it from Microsoft.
- 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.
2. Enable SSH on the ESXi Server
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.
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.
- 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)
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.
- Select permissions
- Change type of access to “Read+Write” then select allow root access.
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.
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.