Tuesday 19 January 2021

How to Integrate a Centralised FreeNAS NFS Storage to a VMware ESXi Host

Centralized storage is a must-have feature on VMware infrastructure. It enables VMware to support crucial functionalities like VMotion, Failover, DRS, and HA. There are different ways to integrate centralize storage space to a VMware ESXi Host. This blog discusses about its possibilities based on NFS with FreeNAS OS.

In our previous blog(How to Install and configure FreeNAS), we have discussed how to install and configure FreeNAS Operating System. Now let us see how we can create a NFS storage space in FreeNAS and adding the same to VMware ESXi client.

Follow the steps below to configure the storage.

1. Login to FreeNAS console.


2) Go to “Services” tab from the top and start “NFS SERVICE” if it is in a stopped state.


3) Select “storage” from the menu and click on “Volume manager”. In the newly popped window, enter the volume name, then click on “+” symbol for adding available disk to the volume manager. After that click on the Add volume button. If there are multiple hard disk available, then you can configure features like mirroring, raid etc. from the volume layout option.


4) Once the volume is added, you will see extra buttons for managing volumes in the storage menu. Click on the DB icon to set permission or ownership for the NFS.


5) Select the “sharing” option from the top menu and select “UNIX(NFS)”, Then Click on “add Unix(NFS) Share”. Here, you have to browse the path of the newly created share and click OK. If you do not want to give write permission for “others” in step four, click on advanced mode and select “Map root user” as root and “map root group” as a wheel. When we try to write something to the datastore when maproot is disabled, the root user of ESXi will be considered as an anonymous user in FreeNAS server and it will inherit permissions of “others”. To resolve the issue, you can enable write permission to others in step four or else you can enable maproot/mapgroup to user root/wheel respectively. In that case, the ESXi user will get the permission of FreeNAS root user or freenas wheel group user permission.



6) Login to ESXi client or vCenter server and select “Storage” and click on “new data store”. In the new window, select “Mount NFS data store”


7) Enter the NFS server (FreeNAS Server) IP, share location and NFS version and click Next and finish the setup.