With vSphere 6.5U2d (and later versions), on using encoded URLs, while trying to PUT VM files in specified Datacenter and Datastore using HTTP PUT request then the request fails.
In vSphere 6.5U2, the PUT request succeeds , regardless of encoded or non encoded URL
Example of non encoded URL https://vc1.example.com/folder/vm1/vm1.vmx?dcPath=Test-DC&dsName=iSCSI-1
Example of encoded URL: https://vc1.example.com/folder/vm1/vm1.vmx?dcPath%3DTest-DC%26dsName%3DiSCSI-1
where we replace "=" with %3D and "&" with %26
For a VM containing space characters in its name (E.g.: "vm with space"), GET/PUT HTTP requests will fail if the space is not encoded with %20, in all versions.
Environment
VMware vCenter 6.5 U2d
Resolution
To resolve this issue:
For VMs having no space characters in the name, do not use encode URLS.
For VMs having space characters in the name, the space characters should be encoded with %20.