Bug 1412110

Summary: virt-v2v fails to import vsphere guest, virsh xmldump error
Product: [Community] Virtualization Tools Reporter: sheepdestroyer <sheepdestroyer>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: libvirt-maint, sheepdestroyer
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description sheepdestroyer 2017-01-11 09:43:35 UTC
I fail to import a vsphere vm with virt-v-2v, and I get errors when trying to dump the xml of the guest. Virsh connection to hypervisor OK.

I am on Fedora 25 up to date, libvirt 2.2.0. I also tried on a Centos 7.2 and 7.3 and get the same error.
The ESXi host is on VMware ESXi, 5.5.0, 3116895
The vm name is : ExportTest1
The ESXi Host is : 172.20.80.63
Cluster is : ExportTest1
DCname : pcc-178-32-195-97_datacenter1203

- In browser folder view URL with dcPath value included : https://pcc-178-32-195-97.ovh.com/folder/ExportTest1?dcPath=pcc%252d178%252d32%252d195%252d97%255fdatacenter1203&dsName=pcc%252d004309

- Actual in browser ExportTest1.vmx URL : https://pcc-178-32-195-97.ovh.com/folder/ExportTest1/ExportTest1.vmx?dcPath=pcc%252d178%252d32%252d195%252d97%255fdatacenter1203&dsName=pcc%252d004309


You can see in the following logs that the dcPath reported by virsh and virt-v2v is not the same as the actual one I see in the browser :


 

[root@fedora25 ~]# virsh -c 'vpx://admin.com/pcc-178-32-195-97_datacenter1203/Qualification/172.20.80.63/' list --all
setlocale: No such file or directory
Enter admin's password for pcc-178-32-195-97.ovh.com: 
 Id    Name                           State
----------------------------------------------------
 188   vs-qua-prd-mai-fr-901          running
 190   vs-qua-prd-ima-fr-901          running
 236   vs-pre-prd-ima-fr-901          running
 238   vs-pre-prd-mai-fr-901          running
 266   vs-eps-dev-web-fr-901          running
 489   vs-pre-prd-ili-fr-901          running
 702   vs-pre-bck-iap-fr-901          running
 706   vs-pre-bck-ili-fr-901          running
 -     ExportTest1                    shut off
 -     vs-eps-qua-web-fr-901          shut off

[root@fedora25 ~]# 

------------------------------------------------------------------------------------------------------------

[root@fedora25 ~]# virt-v2v -v -x -ic vpx://admin.com/pcc-178-32-195-97_datacenter1203/Qualification/172.20.80.63 ExportTest1virt-v2v: libguestfs 1.34.3 (x86_64)
libvirt version: 2.2.0
[   0.0] Opening the source -i libvirt -ic vpx://admin.com/pcc-178-32-195-97_datacenter1203/Qualification/172.20.80.63 ExportTest1
input_libvirt_vcenter_https: source: scheme vpx server pcc-178-32-195-97.ovh.com
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "libvirt"
Enter admin's password for pcc-178-32-195-97.ovh.com: 
virt-v2v: error: internal error: invalid argument: cannot fetch XML 
description of guest 'ExportTest1': internal error: HTTP response code 404 
for download from 
'https://pcc-178-32-195-97.ovh.com:443/folder/ExportTest1%2fExportTest1%2evmx?dcPath=pcc%2d178%2d32%2d195%2d97%5fdatacenter1203&dsName=pcc%2d004309'
rm -rf '/var/tmp/null.LjHmik'
libguestfs: trace: close
libguestfs: closing guestfs handle 0x26f18f0 (state 0)
[root@fedora25 ~]# 

------------------------------------------------------------------------------------------------------------------

[root@fedora25 ~]# virsh -c 'vpx://admin.com/pcc-178-32-195-97_datacenter1203/Qualification/172.20.80.63/' dumpxml ExportTest1
setlocale: No such file or directory
Enter admin's password for pcc-178-32-195-97.ovh.com: 
error: internal error: HTTP response code 404 for download from 'https://pcc-178-32-195-97.ovh.com:443/folder/ExportTest1%2fExportTest1%2evmx?dcPath=pcc%2d178%2d32%2d195%2d97%5fdatacenter1203&dsName=pcc%2d004309'

[root@fedora25 ~]# 

-------------------------------------------------------------------------------------------------------