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

Bug 1366027

Summary: Import VM list load fails when VMWare source Datacenter name contains one or more spaces
Product: Red Hat Enterprise Virtualization Manager Reporter: Derrick Ornelas <dornelas>
Component: ovirt-engineAssignee: Nobody <nobody>
Status: CLOSED DUPLICATE QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.6.8CC: gklein, lsurette, michal.skrivanek, oourfali, rbalakri, Rhev-m-bugs, srevivo, ykaul
Target Milestone: ovirt-4.0.5   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-11 06:56:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Derrick Ornelas 2016-08-10 19:43:05 UTC
Description of problem:

The Import Virtual Machine feature fails to load properly when using VMWare source and a source Datacenter name that contains one or more spaces


Version-Release number of selected component (if applicable):
rhevm-3.6.8.1-0.1.el6
vdsm-4.17.33-1.el7ev
libvirt-daemon-1.2.17-13.el7_2.5
virt-v2v-1.28.1-1.55.el7_2.4


How reproducible:  100%


Steps to Reproduce:
1.  Go to Virtual Machines tab and click 'Import'
2.  Select 'VMWare' as the Source
3.  Enter in appropriate info for vCenter, ESXi, Username, and Password
4.  Enter in Datacenter value that includes at least one space, such as 'VC 5.5 Datacenter'
5.  Click Load button

Actual results:

Failed to communicate with the external provider, see log for additional details.


Expected results:

The 'Virtual Machines on Source' list is populated


Additional info:

engine.log
---
2016-08-10 15:25:09,586 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVmsFromExternalProviderVDSCommand] (ajp-/127.0.0.1:8702-9) [] START, GetVmsFromExternalProviderVDSCommand(HostName = rhev2, GetVmsFromExternalProviderParameters:{runAsync='true', hostId='81a07b21-7635-4d61-8d5c-4aa9adcde0a8', url='vpx://Administrator.com/VC 5.5 Datacenter/5-5.Cluster/esx.example.com?no_verify=1', username='Administrator'}), log id: 4e07d2d6
---


vdsm.log
---
jsonrpc.Executor/6::DEBUG::2016-08-10 15:25:09,589::__init__::515::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'Host.getExternalVMs' in bridge with {u'username': u'Administrator', u'password': '********', u'uri': u'vpx://Administrator.com/VC 5.5 Datacenter/5-5.Cluster/esx.example.com?no_verify=1'}
[...]
jsonrpc.Executor/6::ERROR::2016-08-10 15:25:19,616::v2v::147::root::(get_external_vms) error connection to hypervisor: 'internal error: Unable to parse URI vpx://Administrator.com/VC 5.5 Datacenter/5-5.Cluster/esx.example.com?no_verify=1'
---


The correct URI should be:

  vpx://Administrator.com/VC%205.5%20Datacenter/5-5.Cluster/esx.example.com?no_verify=1

Comment 2 Yaniv Kaul 2016-08-10 20:01:59 UTC
Pretty sure it's a dup, setting for 4.0.5 for the time being.

Comment 3 Michal Skrivanek 2016-08-11 06:56:10 UTC
spaces need to be escaped (documented by https://bugzilla.redhat.com/show_bug.cgi?id=1250715#c5 in libguestfs docs)
we try to improve it in bug 1356767 also for other special chars

*** This bug has been marked as a duplicate of bug 1356767 ***