VMware Cloud Community
hout
Contributor
Contributor

esxi 5.1 - Unable to connect to NFS server - FreeNAS-8.3.0-RELEASE-x86

I get "Unable to connect to NFS server"  when I try to connect to FreeNAS NFS share using ESXi 5.1, but both can connect to NFS share on linux. Further linux can connect to the share on FreeNAS. I think it is some setting or protocol thing between ESXi and FreeNAS 8.2. Any help would be appreciated.

The exact error is:

Call "HostDatastoreSystem.CreateNasDatastore" for object "ha-datastoresystem" on ESXi "192.168.0.242" failed.
NFS mount 192.168.0.239:/mnt/array1 failed: Unable to connect to NFS server.

Also get similar error an ESXi 3.51 server.

IP#: esxi 3.51 192.168.0.241 / esxi 5.1 192.168.0.242 /  FreeNAS 192.168.0.239 (not virtual) / linux vm (on esxi 3.51) 192.168.0.249

I have checked the following actions

  • vmkping 192.168.0.239 (freeNAS IP) and get response on both esxi 3.51 & 5.1
  • I have checked ESXi5.1 firewall and made sure outgoing NFS connection is enable.
  • I can connect to an NFS share on a linux box via both ESX 3.51 & 5.1 (same 192.168.0.0/24 network)
  • I can also connect to the FreeNAS share from linux box and virtual linux machine (same 192.168.0.0/24 network)
  • the FreeNAS can ping the esxi servers
  • reverse DNS is working on FreeNAS (ie the IP of ESXi boxes gets resolved to a name)
  • the ip of the esxi boxes is in the Authorized networks
  • I have set "Map User" to root in FreeNAS. I dont know how to set no_root_squash in FreeNAS or BSD shell.

Here is the /etc/export file for the FreeNAS

/mnt/array1  -alldirs -maproot=root: -network 192.168.0.0/24

    0 Kudos
    5 Replies
    admin
    Immortal
    Immortal

    Could you please paste output of following commands, from 5.1 host

    esxcli network interface

    esxcli network vswitch standard

    nc -z <NAS SERVER IP> 2049

    0 Kudos
    hout
    Contributor
    Contributor

    Thank you for your reply. I zapped my shares which where formated as UFS and reformated as ZFS and all is good. I guess linux can mount ufs and esx can mount ext2 or zfs but not ufs.

    p.s. The commands you asked me to run dont work.

    0 Kudos
    helux
    Contributor
    Contributor

    it looks like it is a bug in freenas.

    when mounting as nfs filesystem, the client which is connecting, is not connecting it as a local filesystem like ext2/3, ufs or zfs. it is mounting it as a nfs filesystem.

    esxi is not able to mount zfs volumes, but is able to mount nfs volumes.

    zfs is a way better filesystem and way more flexible then ufs on freenas so keep it that way....

    0 Kudos
    hout
    Contributor
    Contributor

    thanks for your reply. I understand ZFS is better, but this machine has only 1GB of RAM. I was hoping to get better performance. I am only using it for backup of VM's via SSH vmkfstools command, so I can move vm to another host in case the host dies.

    0 Kudos
    alwang1234
    Contributor
    Contributor

    Not sure if the problem is resolved.  Adding my part of discovery.

    In the FreeNas AdminGUI, try to "Maproot User" and "Maproot Group" to "root" and "wheel" respectively.  I was able to get ESXi 5.1 to access FreeNAS-8.3.0 exported NFS datastore after I did both mappings.  Installed a Ubuntu VM with the NFS datastore.

    [root@freenas] ~# cat /etc/exports

    /mnt/freenas_vol1 -alldirs -maproot=root:wheel -nework 192.168.1.0/24

    0 Kudos