Previous Topic: Instant Virtual Machine Fails to Boot in Hyper-V After Restarting the Recovery ServerNext Topic: Fail to Deploy Integration service to Guest VM in Hyper-V


Failed to Create VMware NFS Datastore 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 datastore when you create InstantVM NFS datastore, even when some datastore are no longer available. For example, the NFS datastore 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 datastore from the ESX server.

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

    The same error is displayed in the command line.

    Error performing operation: Unable to resolve hostname 'host2'.
    
  3. Add a mapping in the /etc/hosts file of the ESX server to resolve this issue.

    <IP address> <hostname>

    Note: The IP address should be reachable.

    Example: 10.57.X.X host2

  4. List all the NFS datastore using the following command:
    esxcfg-nas -l
    
    arcserve_UDP_<hostname> is /arcserve_UDP_IVM_{ESX_generated_number} from <hostname> unmounted unavailable
    

    Example: esxcfg-nas –l

    arcserve_UDP_host2 is /arcserve_UDP_IVM_{991555E6-09A4-4D80-A47E-522831A62Axx} from host2 unmounted unavailable

  5. Use the following command to delete the unavailable datastore:
    esxcfg-nas -d arcserve_UDP_host2
    
  6. Remove the <hostname> mapping in the /etc/hosts file from the ESX server.

    Now you can use the NFS function as usual.

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