I’ve had a requirement recently to create a small XenServer 6.2 test/demo environment. I decided to use a Windows 2008 R2 host as an NFS server to provide shared storage to the XenServer hosts as it is quick and easy to set up.
First of all you have to install NFS services. This is done by running the following command:
ServerManagerCmd -install File-Services FS-NFS-Services
Once the installation is complete, the next step is to create a share. First of all, create a folder, then right click on it and select the NFS Sharing tab:
Click the Manage NFS Sharing button:
For our purposes, it’s fine to leave the defaults, but we will need to change a setting in the permissions options:
We need to ensure that ‘Allow root access’ is enabled, and that the share is set to Read-Write. By default it will be set as read only. If required, you can set it so that only certain IP address are able to connect to the share, however in this example I will leave it as allow all.
Now the share has been set up it can be added to the XenServer hosts as a Storage Repository. In XenCenter, right click a XenServer host and select ‘New SR’:
Next, choose NFS VHD as the virtual disk storage type:
On the next screen, give the SR a name:
Finally, enter the path to the NFS share created earlier:
After clicking finish the new SR should be available.
If you wanted to use this NFS share with an ESXi environment rather than XenServer, the setup is identical on the NFS server. To connect an ESXi host to it, use the Add Storage wizard in the vSphere client:Follow @buildvirtual