The goal is to mount a NFS share on a ESXi 5.5 host via CLI on the host. esxcli storage nfs add -H Net-App-Server -s /vol-xxxx -v datastore-name
In this lab example I will use this command:
esxcli storage nfs add -H 192.168.0.5 -s /nfs-test -v nfs-test
~ # esxcli storage nfs add -H 192.168.0.5 -s /nfs-test -v nfs-test
Sysinfo error on operation returned status : Unable to connect to NFS server. Please see the VMkernel log for detailed error information
I re-run the command, but have this command running in a new putty window.
tail -f /var/log/vmkernel.log
2016-04-11T22:58:22.699Z cpu1:33971 opID=9417ea08)NFS: 168: NFS mount 192.168.0.5:/nfs-test failed: Unable to connect to NFS server.
I re-ran the esxcli storage nfs add command after the tcp port 111 was opened and passed the netcat command, but I received a new error. I ran the tail -f /var/log/vmkernel.log command in a new putty window to find the detail error in real-time.
~ # esxcli storage nfs add -H 192.168.0.5 -s /nfs-test -v nfs-test
Sysinfo error on operation returned status : The NFS server denied the mount request. Please see the VMkernel log for detailed error information
2016-04-12T19:33:13.314Z cpu0:33989 opID=a48a8747)NFS: 190: NFS mount 192.168.0.5:/nfs-test failed: The mount request was denied by the NFS server. Check that the export exists and that the client is permitted to mount it.
Since this issue was per-staged in my lab in windows 2012, the type of access was NOT set to Read-Write nor Allow root access checked off. Once both were set, I was able to mount the NFS share.
esxcli storage nfs add -H 192.168.0.5 -s /nfs-test -v nfs-test
From /var/log/vmkernel.log
2016-04-11T23:35:50.036Z cpu0:33990 opID=6fcbd789)NFS: 218: NFS mount 192.168.0.5:/nfs-test status: Success
ESXi KBA from VMware http://kb.vmware.com/kb/1005948
Handy KBA from NetApp – 1012655 – How to mount an NFS export to a VMware ESX server which requires ‘root’ mount permission