Hide Forgot
Description of problem: oVirt fails to load the list of VMs when querying a VMware vCenter that includes few special chars within the VMware-datacenter or VMware-cluster. The same reproduced when running virsh ot virt-v2v. Details: The ovirt engine sends the already encoded uri to VDSM (a fix for Bug 1356767), But it fails on libvirt or virtv2v with two kind of errors: 1. For any one of the following chars exists in datacenter/cluster: %, /, \ the following error appears in libvirt: "Could not find datacenter specified in <uri>" 2. For any one of the following chars exists in datacenter/cluster: &, +, =, ? the following error appears in virt-v2v: virt-v2v: error: internal error: invalid argument: cannot fetch XML description of guest '111': internal error: HTTP response code 404 for download from 'https://vcenter:443/folder/111%2f111%2evmx?dcPath=Folder1%2fFolder2%2fCompute%2b3&dsName=global' or from vdsm log: jsonrpc.Executor/6::ERROR::2016-08-31 14:20:10,003::v2v::168::root::(get_external_vms) error getting domain xml for vm 'RHEL7_thick_eager_zeroed': internal error: HTTP response code 404 for download from 'https://vcenter:443/folder/RHEL7%5fthick%5feager%5fzeroed%2fRHEL7%5fthick%5feager%5fzeroed%2evmx?dcPath=Folder1%2fFolder2%2fCompute%2b1&dsName=nsimsolo%5fiSCSI%5f3' Version-Release number of selected component (if applicable): libvirt Version : 1.2.18.4 ovirt 4.0.4 How reproducible: 100% Steps to Reproduce: 1. Declare a VMware data center or cluster with one of the chars described above. 2. a. Try to run virsh -c "vpx://administrator@vcenter/encoded-datacenter/encoded-cluster/esxi?no_verify=1" with the datacenter,cluster declared in 1. b. or if (a) passes, try to run: virt-v2v -v -x -o null -ic "vpx://administrator@vcenter/encoded-data-center/encoded-cluster/esxi?no_verify=1" vm-to-import Actual results: a. the following error appears: error: failed to connect to the hypervisor error: internal error: Could not find datacenter specified in '/datacenter/cluster/esxi' b. The following error appears: virt-v2v: error: internal error: invalid argument: cannot fetch XML description of guest 'vm-to-import': internal error: HTTP response code 404 for download from 'https://vcenter:443/encoded-datacenter/encoded-cluster&dsName=global' Expected results: it should work without errors as done with other special chars. Additional info:
*** Bug 2139723 has been marked as a duplicate of this bug. ***