[libvirt-users] the probelm in using libvirt to connect esx server

Matthias Bolte matthias.bolte at googlemail.com
Mon Feb 20 21:44:47 UTC 2012


2012/2/20 冰淇淋 <453193368 at qq.com>:
> hi,
> I am a new user of libvirt ,i really appreciate libvirt,and want to use it
> in my work.I want to use it to conncet to a ESXi server.when I try to
> connect to the server ,I use the command :virsh -c
> esx://name@exmaple.com,And I get an
>
> 1.error :error: internal error curl_easy_perform() returned an error:
> Couldn't connect to server (7) : couldn't connect to host
>  so I think maybe the firewall shutdown the 443 for https,so I used
> command:virsh -c esx://name@example.com/?transport=http And I still get an
> error like:
> error: internal error HTTP response code 417 for call to
> 'RetrieveServiceContent'
> error: failed to connect to the hypervisor

HTTP error code 417 is related to the Expect header. The error
indicates that the server or a proxy in between doesn't handle the
Expect header. I assume that the ESXi sever itself is not the problem,
because it works for me here. Maybe there is a HTTP proxy between your
computer and the ESXi server that returns this 417 error code.

This problem is probably related to libvirt sending a dummy Expect
header instead of sending no Expect at all.

If you're building libvirt from source you can try this patch that I
just send to the mailing list for review

https://www.redhat.com/archives/libvir-list/2012-February/msg00860.html

It fixes the Expect header problem and might fix your connection problem.

-- 
Matthias Bolte
http://photron.blogspot.com




More information about the libvirt-users mailing list