Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1839917

Summary: There is no info "Opening the source -i libvirt -ic vpx://..." shown if any IP is wrong in vpx:// URL during v2v conversion
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: mxie <mxie>
Component: virt-v2vAssignee: Pino Toscano <ptoscano>
Status: CLOSED ERRATA QA Contact: tingting zheng <tzheng>
Severity: low Docs Contact:
Priority: low    
Version: 8.3CC: jsuchane, juzhou, mzhan, ptoscano, tyan, tzheng, xiaodwan, zili
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.3   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-v2v-1.42.0-4.module+el8.3.0+6798+ad6e66be Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2041886 (view as bug list) Environment:
Last Closed: 2020-11-17 17:48:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2041886    

Description mxie@redhat.com 2020-05-26 02:12:27 UTC
Description of problem:
There is no info "Opening the source -i libvirt -ic vpx://..." shown if any IP is wrong in vpx:// URL during v2v conversion

Version-Release number of selected component (if applicable):
virt-v2v-1.42.0-3.module+el8.3.0+6497+b190d2a5.x86_64
libguestfs-1.42.0-1.module+el8.3.0+6496+d39ac712.x86_6

How reproducible:
100%

Steps to Reproduce:
Scenario1:
1.1 Convert a guest from VMware by v2v but write incorrect vCenter IP in command line, found there is no info output more than 2mins until the conversion is failed with error, besides, there is no debug info "Opening the source -i libvirt -ic vpx://root@......" shown during conversion

1.1.1 # virt-v2v -ic vpx://root.198.169/data/10.73.199.216/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 esx7.0-win2019-x86_64 -ip /home/passwd -o null
virt-v2v: error: exception: libvirt: VIR_ERR_INTERNAL_ERROR: VIR_FROM_ESX:
internal error: Could not find compute resource specified in
'/data/10.73.199.216/'

If reporting bugs, run virt-v2v with debugging enabled and include the
complete output:

  virt-v2v -v -x [...]


1.1.2 Add -v -x to convert again, can see the error info is reported after more than 2mins
# virt-v2v -ic vpx://root.198.168/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 esx7.0-win2019-x86_64 -ip /home/passwd -o null -v -x |& ts
May 23 05:48:55 virt-v2v: virt-v2v 1.42.0rhel=8,release=3.module+el8.3.0+6497+b190d2a5 (x86_64)
May 23 05:48:55 libvirt version: 6.3.0
May 23 05:51:05 virt-v2v: error: exception: libvirt: VIR_ERR_INTERNAL_ERROR: VIR_FROM_ESX:
May 23 05:51:05 internal error: curl_easy_perform() returned an error: Couldn't connect to
May 23 05:51:05 server (7) : Failed to connect to 10.73.198.168 port 443: Connection timed
May 23 05:51:05 out
May 23 05:51:05 rm -rf '/var/tmp/null.aRkVgg'


Scenario2:
2.1 Convert a guest from VMware by v2v but write incorrect ESXi IP in command line, v2v will report the error info immediately but there is also no debug info "Opening the source -i libvirt -ic vpx://root@......" shown

# virt-v2v -ic vpx://root.198.169/data/10.73.199.216/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 esx7.0-win2019-x86_64 -ip /home/passwd -o null -v -x |& ts
May 23 06:01:12 virt-v2v: virt-v2v 1.42.0rhel=8,release=3.module+el8.3.0+6497+b190d2a5 (x86_64)
May 23 06:01:12 libvirt version: 6.3.0
May 23 06:01:12 virt-v2v: error: exception: libvirt: VIR_ERR_INTERNAL_ERROR: VIR_FROM_ESX:
May 23 06:01:12 internal error: Could not find compute resource specified in
May 23 06:01:12 '/data/10.73.199.216/'
May 23 06:01:12 rm -rf '/var/tmp/null.kllWxq'


Scenario3:
3.1 Convert a guest from VMware by v2v and make sure vpx:// URL is correct, debug info "Opening the source -i libvirt -ic vpx://root@......" is shown during conversion

# virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 esx7.0-win2019-x86_64 -ip /home/passwd -o null -v -x |& ts
May 23 06:27:46 virt-v2v: virt-v2v 1.42.0rhel=8,release=3.module+el8.3.0+6497+b190d2a5 (x86_64)
May 23 06:27:46 libvirt version: 6.3.0
May 23 06:27:46 [   0.2] Opening the source -i libvirt -ic vpx://root.198.169:443/data/10.73.199.217/?no_verify=1 esx7.0-win2019-x86_64 -it vddk  -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78
May 23 06:27:46 libvirt xml is:
......


Actual results:
As above description

Expected results:
There is info "Opening the source -i libvirt -ic vpx://..." shown immediately even if any IP is wrong in vpx:// URL during v2v conversion

Additional info:
Can't reproduce the bug on rhel8.2 with below builds:
virt-v2v-1.40.2-22.module+el8.2.0+6029+618ef2ec.x86_64
libguestfs-1.40.2-22.module+el8.2.0+6029+618ef2ec.x86_64


1.Convert a guest from VMware by v2v but write incorrect vCenter IP in command line, info "Opening the source -i libvirt -ic vpx://..." is shown immediately 

# virt-v2v -ic vpx://root.198.168/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 esx7.0-win2019-x86_64 -ip /home/passwd -o null -v -x |& ts
May 23 18:03:30 virt-v2v: libguestfs 1.40.2rhel=8,release=22.module+el8.2.0+6029+618ef2ec,libvirt (x86_64)
May 23 18:03:30 libvirt version: 6.0.0
May 23 18:03:30 nbdkit --help
May 23 18:03:30 nbdkit --dump-config
May 23 18:03:30 [   0.1] Opening the source -i libvirt -ic vpx://root.198.168/data/10.73.199.217/?no_verify=1 esx7.0-win2019-x86_64 -it vddk  -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78
May 23 18:05:39 libvirt: ESX Driver error : internal error: curl_easy_perform() returned an error: Couldn't connect to server (7) : Failed to connect to 10.73.198.168 port 443: Connection timed out
May 23 18:05:39 virt-v2v: error: internal error: invalid argument: cannot open libvirt
May 23 18:05:39 connection ‘vpx://root.198.168/data/10.73.199.217/?no_verify=1’
May 23 18:05:39 rm -rf '/var/tmp/null.XspFvY'

Comment 1 Pino Toscano 2020-05-26 06:24:42 UTC
Patch proposed upstream:
https://www.redhat.com/archives/libguestfs/2020-May/msg00086.html

Comment 2 Pino Toscano 2020-05-26 10:04:38 UTC
(In reply to Pino Toscano from comment #1)
> Patch proposed upstream:
> https://www.redhat.com/archives/libguestfs/2020-May/msg00086.html

Fixed upstream with
https://github.com/libguestfs/virt-v2v/commit/86d87563ee03e86ca9abdcad4f674af66a883006

Comment 5 tingting zheng 2020-06-05 08:35:45 UTC
Test the bug with:
libguestfs-1.42.0-2.module+el8.3.0+6798+ad6e66be.x86_64
qemu-kvm-5.0.0-0.module+el8.3.0+6620+5d5e1420.x86_64
libvirt-6.4.0-1.module+el8.3.0+6881+88468c00.x86_64
virt-v2v-1.42.0-4.module+el8.3.0+6798+ad6e66be.x86_64

Scenario 1:Correct Vcenter IP and incorrect ESXi IP, v2v will report the error info immediately and debug info "Opening the source -i libvirt -ic vpx://root@......" is showed.
#virt-v2v -ic vpx://root.198.169/data/10.73.199.216/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 esx7.0-win2019-x86_64 -ip /home/passwd -o null
[   0.0] Opening the source -i libvirt -ic vpx://root.198.169/data/10.73.199.216/?no_verify=1 esx7.0-win2019-x86_64 -it vddk  -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78
virt-v2v: error: exception: libvirt: VIR_ERR_INTERNAL_ERROR: VIR_FROM_ESX:
internal error: Could not find compute resource specified in
'/data/10.73.199.216/'

If reporting bugs, run virt-v2v with debugging enabled and include the
complete output:

  virt-v2v -v -x [...]


#virt-v2v -ic vpx://root.198.169/data/10.73.199.216/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 esx7.0-win2019-x86_64 -ip /home/passwd -o null -v -x
virt-v2v: virt-v2v 1.42.0rhel=8,release=4.module+el8.3.0+6798+ad6e66be (x86_64)
libvirt version: 6.4.0
[   0.0] Opening the source -i libvirt -ic vpx://root.198.169/data/10.73.199.216/?no_verify=1 esx7.0-win2019-x86_64 -it vddk  -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78
virt-v2v: error: exception: libvirt: VIR_ERR_INTERNAL_ERROR: VIR_FROM_ESX:
internal error: Could not find compute resource specified in
'/data/10.73.199.216/'
rm -rf '/var/tmp/null.aKCQ6t'


Scenario 2:Incorrect Vcenter IP and correct ESXi IP,debug info "Opening the source -i libvirt -ic vpx://root@......" is showed and error info is showed after several minutes timeout.
# virt-v2v -ic vpx://root.198.168/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 esx7.0-win2019-x86_64 -ip /home/passwd -o null
[   0.0] Opening the source -i libvirt -ic vpx://root.198.168/data/10.73.199.217/?no_verify=1 esx7.0-win2019-x86_64 -it vddk  -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78
virt-v2v: error: exception: libvirt: VIR_ERR_INTERNAL_ERROR: VIR_FROM_ESX:
internal error: curl_easy_perform() returned an error: Couldn't connect to
server (7) : Failed to connect to 10.73.198.168 port 443: Connection timed
out

If reporting bugs, run virt-v2v with debugging enabled and include the
complete output:

  virt-v2v -v -x [...]

Refer to the above comments,move the bug to VERIFIED.

Comment 8 errata-xmlrpc 2020-11-17 17:48:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (virt:8.3 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:5137