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.

Thanks for dropping by. Ready for the next blog?

How to configure mod_evasive on CentOS 7

  • klutch14u

    Nice writeup, quick and to the point. I can see my datastore in vmware but can’t seem to write to it. Not sure what I did wrong. Even just trying to create a folder in it fails. FreeNAS 11.2 and VMware 6.7

    • AskAlly

      Think the user may not have the write permissions. You may check the permissions from the backend instead of FreeNAS GUI. Please refer the below links mentioned in VMware community for troubleshooting.

      https://communities.vmware.com/thread/486067
      https://communities.vmware.com/thread/483124

      • klutch14u

        Thanks. On step 5 you also have to go into advanced and set Maproot User to root, after that I could write to it fine.

        • AskAlly

          Thanks klutch14u, we found the problem.

          The screenshot in step four was not the correct one. We set up this environment with write permission for the others. When we try to write something to the datastore when maproot is disbaled, the root user of esxi will be considered as an anonymous user in freenas server and it will inherit permisions 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 respectievly. In that case, the esxi user will be get permision of freenas root user or freenas wheel group user permision. I have updated the picture of step four. Once again thank you.

Rabeel
Author : Rabeel
Written on : 13 Mar, 2018

Who we are ?

Founded in 2010, we are a team of a sysadmins with super awesome server management skills who likes to give super quality support at super affordable price.

Services