Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1373863

Summary: Few special characters in VMware cluster and data center are not handled well by libvirt/virt-v2v
Product: Red Hat Enterprise Linux 7 Reporter: Sharon Gratch <sgratch>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED WONTFIX QA Contact: Yanqiu Zhang <yanqzhan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.2CC: cww, dornelas, dyuan, michal.skrivanek, mxie, rbalakri, rjones, tjelinek, xuzhang, zpeng
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-27 21:24:03 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: 1356767, 1420851, 1437480    

Description Sharon Gratch 2016-09-07 10:10:53 UTC
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:

Comment 8 Jaroslav Suchanek 2022-11-03 13:36:36 UTC
*** Bug 2139723 has been marked as a duplicate of this bug. ***