P2V Conversion Failure at 3% on Linux machine: Error "Host hostname/IPaddress key can't be retrieved" (return code 2)
search cancel

P2V Conversion Failure at 3% on Linux machine: Error "Host hostname/IPaddress key can't be retrieved" (return code 2)

book

Article ID: 311646

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • When attempting to convert a Powered-On Linux machine using VMware Converter 5.5.1 or later, the process fails at 3% with the following error message
    "FAILED: A general system error occurred: getaddrinfo hostname/IPaddress: Name or service not known getaddrinfo Name or service not known Network error. Host hostname/IPaddress key can't be retrieved. (return code 2)"
  • In the log file (C:\ProgramData\VMware\VMware vCenter Converter Standalone\logs\vmware-converter-server-X.log), you may see entries related to this error indicating that the hostname or IP address cannot be resolved or accessed during the conversion process.
<YYYY-MM-DD>T<time>[01320 info 'vmomi.soapStub[0]'] Resetting stub adapter for server <cs p:02adef48, PIPE:\\.\pipe\vmware-converter-worker-soap> : Closed
<YYYY-MM-DD>T<time>[02272 error 'Default'] [task,350] [LRO] Unexpected Exception: vmodl.fault.SystemError
<YYYY-MM-DD>T<time> 142+08:00 [02272 info 'Default'] [task,379] [task-3] -- ERROR -- Convert: vmodl.fault.SystemError
--> (vmodl.fault.SystemError) {
--> dynamicType = <unset>,
--> faultCause = (vmodl.MethodFault) null,
--> reason = "Network error. Host hostname key can't be retrieved.
--> (return code 2)",
--> msg = "",
--> }</time></time></time>



Cause

This issue occurs because the /etc/hosts.allow file on the source Linux machine may not be configured to allow incoming connections from the machine running VMware Converter. By default, the /etc/hosts.allow file may restrict access based on IP addresses or hostnames, preventing proper communication between the Converter and the source machine.

Resolution

 

Resolution:

  1. Log into the source Linux machine as root.

  2. Backup the current /etc/hosts.allow file to ensure you can restore it later:

     
    cp /etc/hosts.allow /etc/hosts.allow.backup
  3. Modify the /etc/hosts.allow file to accept connections from any machine on the network:

     
    echo "ALL:ALL" >> /etc/hosts.allow
  4. Restart the network service to apply the changes:

     
    service network restart
  5. Retry the P2V conversion process. It should now proceed past the 3% mark without the network-related error.

  6. After successfully converting the machine from physical to virtual, restore the original /etc/hosts.allow file from the backup to maintain previous security settings:

     
    cp /etc/hosts.allow.backup /etc/hosts.allow
     

This should resolve the error and allow the P2V conversion to complete successfully.