Attempting to mount the NFS volume fails with the error: Unable to resolve hostname
search cancel

Attempting to mount the NFS volume fails with the error: Unable to resolve hostname

book

Article ID: 313051

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • You cannot add the NFS datastore.
  • Attempting to mount the NFS datastore fails.
  • vSphere Client reports the error:

    Error:Call "HostDatastoreSystem.CreateNasDatastore" for object "ha-datastoresystem" on ESXi "172.xx.xx.xx" failed.
    Operation failed, diagnostics report: Unable to resolve hostname 'SERV.example.com'
  • Attempting to add the NFS datastore from the command line fails with the error:
Error performing operation: Unable to resolve hostname 'SERV.example.com'
  • Running the esxcfg-nas -l command lists the NAS volumes with the error:

    ABCDEFG is /vol/ABCDEFG from 10.xx.xx.253 mounted unavailable
    ISO is /vol/ISO from 10.xx.xx.253 mounted unavailable
    Error performing operation: Unable to resolve hostname 'SERV.example.com'


    Where SERV.example.com is an old NFS volume that was removed.
  • You are able to remove the NAS volume successfully without any errors, but you are not able to add the volumes again.


Environment

VMware vSphere ESXi 6.5
VMware vSphere ESXi 5.1
VMware vSphere ESXi 6.7

Cause

This issue occurs if an NFS volume was not removed properly from the host and the entry continues to exist in the esx.conf file.

Resolution

To resolve this issue:
  1. Add a dummy entry in the /etc/hosts file for SERV.example.com. You can use any IP for this.
  2. Run this command to see the old NFS volume that was removed by the customer:

    esxcfg-nas -l

    Note: You will not see the error now.
     
  3. Run this command to remove the old NFS volume:

    esxcfg-nas -d old_volume_name
     
  4. Delete/comment the dummy entry that was added to the /etc/hosts file in Step 1.
  5. Reboot the host.

    You should now be able to add the NFS volume.


Additional Information