Configure Windows 2008 as NFS share for VMware ESX
I decided to expand on the following VMware blog: How to Enable NFS on Windows 2008 and Present to ESX. The same warning applies to this post as well:
Warning: Windows Services for UNIX is not a supported storage solution for use with ESX, and the information in this article is provided as-is
Install NFS Role
1. Start the Server Manager
Start -> Run -> servermanager.msc
2. Choose to add a Role
Actions -> Add Role
3. Click Next on the “Before you Begin” Screen
4. Select “File Services” Under “Select Server Roles”
5. Click Next on the “File Services” Screen
6. Select “Services For Network File System” under the second “Select Server Roles” screen
7. Click Install on the “Confirm Installation Selections” Screen
8. Check out the progress of the install
9. Click Close under the “Installation results
*Make sure the install is successful
Edit Local policy to set Everyone’s permissions to apply to anonymous users
1. Star the Local Policy Security Console
Start -> Run -> secpol.msc
2. Expand the Local Policies –> Security Options
- Expand Local Policies
- Click on Security Options
- Scroll down to “Network Access: Let Everyone permissions apply to anonymous users”
3. Enable “Let Everyone permissions apply to anonymous users”
Create A folder to Share with NFS
1. Create a folder
In our example I created a folder called “nfs_share”
2. Edit “NFS Sharing” settings of the Folder
- Right Click on the folder and select Properties
- Click on the “NFS Sharing” Tab
####
3. Click “Manage NFS Sharing” of the Folder
- Check “Share This Folder”
- Check “Allow Anonymous Access”
- Set the Anonymous UID and GUI to ‘0’
4. Click Permissions From the “NFS Advanced Sharing” Window
- Set the “Type of Access” to “Read/Write”
- Check “Allow root access”
5. Click OK to apply the settings
Allow “Everyone” full Control of the Folder
1. Edit Security Settings of the Folder
Right Click on the folder and Select Properties
2. Select the Security Tab of the Properties
3. Click “Edit” on the Security Tab
4. Click “Add” to add a new User
Type “Everyone” in the object Names and select “Check Names
6. Allow Full Control to Everyone
Set the NFS server to be TCP Only
1. Start the NFS Management Console
Start -> Run -> nfsmgmt.msc
2. Edit Settings of the NFS Server
Right Click on “Server for NFS” and click properties
3. Change the Transport Protocol to be “TCP”
4. Restart the NFS Server
- Right Click on “Server for NFS” and click on “Stop Service”
- Right Click on “Server for NFS” and Click on “Start Service”
Add the NFS Export to the ESX host
1. SSH to the host
Use putty or any ssh client of your choice
2. Add the NFS mount
~ # esxcfg-nas -a -o 10.131.9.153 -s /nfs_share Win2k8_Share
Connecting to NAS volume: Win2k8_Share
Win2k8_Share created and connected.
3. Ensure newly created files are owned by root
~ # cd /vmfs/volumes/Win2k8_Share/
/vmfs/volumes/17212d56-03dc308d # ls
/vmfs/volumes/17212d56-03dc308d # mkdir test
/vmfs/volumes/17212d56-03dc308d # ls -l
drwxr-xr-x 1 root root 64 May 28 04:11 test