Uploaded image for project: 'Migration Toolkit for Virtualization'
  1. Migration Toolkit for Virtualization
  2. MTV-2153

Cold migration failed when esxi hostname can’t resolved to ip address

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • 2.9.0
    • 2.8.0
    • Controller

      Description of problem:

      Create vSphere provider with esxi host ip address, virt-v2v command use esxi hostname but not ip address, which caused the cold migration failed when it can't resolve hostname to ip address

      Version-Release number of selected component (if applicable):

      MTV 2.8.0-14 (IIB: 928472) with CNV 4.17.5

      How reproducible:

      Always

      Steps to Reproduce:

      1) Create a vSphere provider by Endpoint type: ESXi host, URL with ESXi host ip address. 

      Provider resource name: v8-host
      Endpoint type: ESXi  URL: https://10.***/sdk
      Skip certificate validation: true

      2) Create a cold migration plan to migrate VM: mtv-function-win2022 from v8-host to ocp cluster, the plan failed in ImageConversion phase due to virt-v2v can't resolve hostname to ip address

      3) Check the virt pod log: mtv-cold-v8-host-46-kb69k-virt-v2v.log with error:

      "virt-v2v: error: exception: libvirt: VIR_ERR_INTERNAL_ERROR: VIR_FROM_ESX: internal error: IP address lookup for host 'dell-per640-03.redhat.com' failed: Name or service not known"

      exec: /usr/bin/virt-v2v -v -x -o kubevirt -os /var/tmp/v2v -i libvirt -ic esx://root@dell-per640-03.redhat.com?no_verify=1 -ip /etc/secret/secretKey --root first -it vddk -io vddk-libdir=/opt/vmware-vix-disklib-distrib -io vddk-thumbprint=26:54:C4:CB:60:4F:7F:7D:1F:E8:24:CA:73:37:3A:E4:C3:22:A9:FD -- mtv-function-win2022
      ......
      2025-03-03 02:30:15.530+0000: 13: warning : esxConnectOpen:803 : Ignoring unexpected path '' for non-vpx scheme 'esx'
      virt-v2v: error: exception: libvirt: VIR_ERR_INTERNAL_ERROR: VIR_FROM_ESX: internal error: IP address lookup for host 'dell-per640-03.redhat.com' failed: Name or service not known
      rm -rf -- '/tmp/v2v.O2BR54'
      Error executing v2v command: exit status 1
      Failed to execute virt-v2v command: exit status 1

      Actual results:

      In step2,3: virt-v2v command use hostname, cold migration hit error

      Expected results:

      In step2,3: When provider url use ip address, virt-v2v command use ip address, cold migrate VM successfully

      Additional info:

       

              rh-ee-ehazan Elad Hazan
              chhu@redhat.com Chenli Hu
              Chenli Hu Chenli Hu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: