---
title: "Configure QNAP NFS as VMware ESXi Dastastore"
date: "2021-01-12T13:00:00+01:00"
tags: ["Datastore", "ESXi", "NFS"]
categories: ["Storage & Backup", "VMware"]
---

![Sharing][1]

It has been a while since I wrote about NFS datastores and VMware ESXi. In my previous post [How to add NFS export to VMware ESXi 6.5][2]I used NFS server on my host back then. In this post I will show you how you can use QNAP NFS exports with VMware ESXi.
<!--more-->

## Prerequisites
- QNAP NAS 
- VMware ESXi - mentioned solution should work starting from VMware ESXi 6.0+

<!--adsense-->

## QNAP Configuration

QNAP configuration is pretty much straightforward. Let's configure NFS.

1. Login to QNAP NAS.<br>
![QNAP NAS Control Panel][3]
2. From Control Panel choose Win/Mac/NFS<br>
![Win/Mac/NFS][4]
3. Switch to **NFS Service**. Select desired NFS version. I've tested it with both NFS v2/v3 and NFS v4.<br>
![NFS Service][5]
4. QNAP recommends disabling write cache function. Simply click on the link fron the NFS service or go to **Control Panel**, **System**, **Hardware**. De-select **Enable write cache (EXT4 delay allocation)** and click **Apply**.<br>
![Disable EXT4 delay allocation][6]
5. Now we need to create a shared folder. Go to **Control Panel**, **Priviledge**, **Shared Folders**. Click **Create**. Provide share name and choose disk volume if you have more than one.<br>
![Create Shared Folder][7]
6. Now we need to change NFS priviliges to allow access from ESXi hosts. Once the shared folder is crated click the middle icon to assign permissions.<br>
![Assign permissions][8]
7. In a new window choose **NFS Host Access**.<br>
![NFS Host Access][9]
8. Once selected you need to provide following information:
 - **Host/IP/Network**. In my case I've selected Network. If you want to grant access from anywhere simply use <b>*</b> as a wildcard.
 - Choose **read/write**.
 - Select **Squash no users**<br>
![QNAP NFS permissions][10]   
9. Settings are applied and ready to be consumed by VMware ESXi.

## ESXi Configuration
VMware ESXi can consume NFS resources by using NFS version 3 and version 4. I've tested it with both and I will descibre the process.

### NFS v3
1. Click on Datacenter, Cluster or ESXi where you want to attach NFS Datastore.<br>
![Add datastore to VMware ESXi][11]   
2. Choose **NFS** as a new datastore type.<br>
![Choose NFS][12]
3. Choose **NFS 3**.<br>
![NFS 3][13]
4. Provide datastore name, QNAP shared folder and QNAP IP or FQDN.<br>
![QNAP NFS details][14]
5. Select to which hosts or Cluster you want to attach the NFS datastore.<br>
![Add NFS to host or cluster][15]
6. Click **Finish** on ready to complete section.<br>
![Final step NFS QNAP][16]
7. NFS datastore is added. 
8. I initiated Storage vMotion from my local drives to shared NFS drive. It works well.<br>
![NFS Storage vMotion][17]
9. From QNAP point of view we see incoming data :)<br>
![QNAP Admin Panel][18]
10. Here is vMotioned virtual machine.<br>
![Test virtual machine on NFS][19]

### NFS v4

- The procedure only differs from the point number **3**.<br>
![NFS 4][20]
- You can but you don't need to use authentication. In my case I don't have Active Directory so I can't test it. However it works :)<br>
![NFS 4 summary][21]

![NFS 4 datastore][22]

## Summary

In this post I showed you how to configure QNAP and its NFS service to create a datastore on VMware ESXi. I hope it will all work for you. In the next post I will configure datastore using iSCSI from QNAP. Stay tuned!


[1]: /images/uploads/2021/01/pexels-roman-odintsov-4871119.webp
[2]: https://wojcieh.net/how-to-add-nfs-export-to-vmware-esxi-6-5/ "How to add NFS export to VMware ESXi 6-5"
[3]: /images/uploads/2021/01/01-nfs-qnap-datastore.webp
[4]: /images/uploads/2021/01/02-nfs-qnap-datastore.webp
[5]: /images/uploads/2021/01/03-nfs-qnap-datastore.webp
[6]: /images/uploads/2021/01/04-nfs-qnap-datastore.webp
[7]: /images/uploads/2021/01/05-nfs-qnap-datastore.webp
[8]: /images/uploads/2021/01/06-nfs-qnap-datastore.webp
[9]: /images/uploads/2021/01/07-nfs-qnap-datastore.webp
[10]: /images/uploads/2021/01/08-nfs-qnap-datastore.webp
[11]: /images/uploads/2021/01/09-nfs-qnap-datastore.webp
[12]: /images/uploads/2021/01/11-nfs-qnap-datastore.webp
[13]: /images/uploads/2021/01/12-nfs-qnap-datastore.webp
[14]: /images/uploads/2021/01/13-nfs-qnap-datastore.webp
[15]: /images/uploads/2021/01/14-nfs-qnap-datastore.webp
[16]: /images/uploads/2021/01/15-nfs-qnap-datastore.webp
[17]: /images/uploads/2021/01/16-nfs-qnap-datastore.webp
[18]: /images/uploads/2021/01/17-nfs-qnap-datastore.webp
[19]: /images/uploads/2021/01/18-nfs-qnap-datastore.webp
[20]: /images/uploads/2021/01/19-nfs-qnap-datastore.webp
[21]: /images/uploads/2021/01/20-nfs-qnap-datastore.webp
[22]: /images/uploads/2021/01/21-nfs-qnap-datastore.webp
