Host is unable to resolve DNS for NFS datastore.
search cancel

Host is unable to resolve DNS for NFS datastore.

book

Article ID: 394138

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptom:

  • NFS datastore is in inaccessible state on vCenter with an error "The datastore is not accessible".

Validation:

  • SSH to the host and run below command to check the NFS datatore's accessibility -

    [root@esxi1:~] esxcli storage nfs list
    Volume Name    Host                 Share                Vmknic  Accessible  Mounted  Connections  Read-Only  isPE   Hardware Acceleration
    -----------    -------------------  -------------------  ------  ----------  -------  -----------  ---------  -----  ---------------------
    NFS Datastore  nas.####.local       /mnt/share/NFS1      None    false       true     1            true       false  Not Supported

Environment

VMware vSphere ESXi 7.x

VMware vSphere ESXi 8.x

Cause

  • The issue occurs if the DNS VM is unable to resolve the IP for the hosts.

    • vmkping to the target NFS host fails with "Temporary failure in name resolution".

      [root@esxi1:~] vmkping -I vmk0 nas.####.local
      getaddrinfo() for "nas.####.local" failed (-3: Temporary failure in name resolution)

    • nslookup for the NFS host doesn't provide the IP of the NFS host.

      [root@esxi1:~] nslookup nas.####.local
      ;; connection timed out; no servers could be reached

    • We can ping the actual NFS host IP directly, without using fqdn.

      [root@esxi1:~] vmkping -I vmk0 157.###.##.##
      PING 157.###.##.## (157.###.##.##): 56 data bytes
      64 bytes from 157.###.##.##: icmp_seq=0 ttl=254 time=0.226 ms
      64 bytes from 157.###.##.##: icmp_seq=0 ttl=254 time=0.273 ms (DUP!)
      64 bytes from 157.###.##.##: icmp_seq=1 ttl=254 time=0.191 ms
      64 bytes from 157.###.##.##: icmp_seq=1 ttl=254 time=0.228 ms (DUP!)
      64 bytes from 157.###.##.##: icmp_seq=2 ttl=254 time=0.209 ms

      157.###.##.## ping statistics ---
      3 packets transmitted, 3 packets received, +2 duplicates, 0% packet loss
      round-trip min/avg/max = 0.191/0.376/0.273 ms

  • Host is dependent on DNS VMs to resolve the IPs since the NFS volume is mounted with the fqdn on the hosts.

Resolution

  • SSH to the host and update the hosts file with IP FQDN and NFS Hostname -
    eg:
    [root@esxi1:~] vi /etc/hosts

  • Press "i", to switch the vi editor to insert mode and then add the IP, FQDN and NFS Hostname in the file -

    eg:
    127.#.#.#       localhost.localdomain localhost
    ::1             localhost.localdomain localhost
    192.###.#.###   esxi1####.local esxi1
    157.###.##.##      nas.####.local                nas

  • Press "Esc" to switch back to command mode of vi editor and then press ":wq", to write and quit the file.

  • The ESXi host will be able to locally resolve the DNS now.

Additional Information