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/IP> key can't be retrieved.
    --> (return code 2)",
    --> msg = "",
    --> }</time></time></time>


vmware-converter-worker-1.log :

 

<YYYY-MM-DD>T<time> info vmware-converter-worker[08792] [Originator@6876 sub=task-1] args[8]: cat /tmp/.vmware-sysinfo-pzjffzilnvdzmbjm/vmware-sysinfo.log
<YYYY-MM-DD>T<time> info vmware-converter-worker[08792] [Originator@6876 sub=task-1] Converter::Util::SysCommandWrapper::LogResult: Command return code: 0
<YYYY-MM-DD>T<time> info vmware-converter-worker[08792] [Originator@6876 sub=task-1] Converter::Util::SysCommandWrapper::LogResult: Command stdout:
--> <YYYY-MM-DD>T<time> INFO storage ]:  Parted returned device with path: /dev/sdhi, type: 1
--> <YYYY-MM-DD>T<time> ERROR storage ]:  Parted failed to probe device with path: /dev/sdhi, type: 1
--> <YYYY-MM-DD>T<time> INFO storage ]:  Parted returned device with path: /dev/sdam, type: 1
--> <YYYY-MM-DD>T<time> ERROR storage ]:  Parted failed to probe device with path: /dev/sdam, type: 1
--> <YYYY-MM-DD>T<time> INFO storage ]:  Parted returned device with path: /dev/sdbb, type: 1
--><YYYY-MM-DD>T<time> ERROR storage ]:  Parted failed to probe device with path: /dev/sdbb, type: 1

 

Environment

VMware Converter 5.x

VMware Converter 6.x

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.

This error can also occur if the same IP is being used for the source VM and helper VM. This leads to a network configuration conflict or access restriction during the SSH handshake between the temporary target Helper VM and the running source Linux machine.

Resolution

Resolution 1:

  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.



Resolution 2:  If Physical Linux server has multipath enabled on the server 
  • Linux volumes mounted by Device Mapper multipath is not supported hence conversion is not supported 

Reference article : Supported Source Disk Types

NOTE: Ensure the helper VM is assigned a unique IP address that is accessible from the source VM, and that all required network ports are opened according to the below KB: Required VMware vCenter Converter ports