Re: libvirt + ESX (HTTP response code 400 for call to 'Login')

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/3/3 Hereward Cooper <hereward.cooper@xxxxxxxxxx>:
> Hi folks,
>
> I'm trying to connect to a vSphere cluster using the information from
> the libvirt documentation.
>
>
> -------------------
> $ virsh -c
> "vpx://root@10.51.4.11/dc1/dc1-cluster-e01/dc1-vsphere-e04/?no_verify=1"
>
> Enter root's password for 10.51.4.11:
> error: internal error HTTP response code 400 for call to 'Login'
> error: failed to connect to the hypervisor
> -------------------
>
> I seem to be able to establish a connection, but it fails with a "HTTP
> code 400". If I provide the incorrect password it fails with a 'login
> credentials' error, so it looks like I am getting a connection, but it's
> failing for another reason.

400 means bad request. You probably have a character in you password
that needs to be escaped in XML: <, >, &, ', "

libvirt currently doesn't escape the password properly when building
the SOAP request. You can manually workaround this by entering the
password in escaped form. For example when your password is some&word
enter some&amp;word instead.

I posted a patch to fix this:

https://www.redhat.com/archives/libvir-list/2011-March/msg00118.html

> Wireshark is no help as it's all done over SSL/TLS.

By default libvirt uses HTTPS to talk to vSphere server. You can
disable TLS by using the transport=http query parameter like this

virsh -c "vpx://root@10.51.4.11/dc1/dc1-cluster-e01/dc1-vsphere-e04/?no_verify=1&transport=http"

But you'll have to configure the vCenter server to accept HTTP
connections if you want use this.

Matthias


[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux