Failed to Create VMware NFS Data store and Displayed Unable to Resolve Hostname Error

Valid for VMware

Symptom

Instant VM creation fails and displays the following error message:

Failed to create VMWARE NFS DataStore by server <hostname of recovery server>.

Error Message: An error occurred during host configuration.

Details: Operation failed, diagnostics report: Unable to resolve hostname <one hostname but not recovery server>.

Example

Failed to create VMWARE NFS DataStore by server 'host1'.

Error Message: An error occurred during host configuration.

Details: Operation failed, diagnostics report: Unable to resolve hostname 'host2'.

Solution

The reason for this error is that the ESX server lists all the NFS data store when you create InstantVM NFS data store, even when some data store are no longer available. For example, the NFS dat astore created by host2 still exists even if host2 is not available because the machine was deleted. So the ESX server cannot resolve the host name.

To resolve this issue, delete the unavailable data store from the ESX server.

Follow these steps:

  1. Log in to the ESX server using SSH.
  2. Type the following command:
  3. esxcfg-nas –l

  4. The same error is displayed in the command line.
  5. Error performing operation: Unable to resolve hostname 'host2'.

  6. Add a mapping in the /etc/hosts file of the ESX server to resolve this issue.
  7. <IP address> <hostname>
  8. Note: The IP address should be reachable.
  9. Example: 10.57.X.X host2
  10. List all the NFS data store using the following command:
  11. esxcfg-nas –l

    arcserve_UDP_<hostname> is /arcserve_UDP_IVM_{ESX_generated_number} from <hostname> unmounted unavailable

  12. Example: esxcfg-nas –l
  13. arcserve_UDP_host2 is /arcserve_UDP_IVM_{991555E6-09A4-4D80-A47E-522831A62Axx} from host2 unmounted unavailable
  14. Use the following command to delete the unavailable data store:
  15. esxcfg-nas -d arcserve_UDP_host2

  16. Remove the <hostname> mapping in the /etc/hosts file from the ESX server.
  17. Now you can use the NFS function as usual.

Note: For more information on this issue, see the VMware KB article.