[libvirt-users] libvirt -user'question

Matthias Bolte matthias.bolte at googlemail.com
Tue Feb 21 20:33:24 UTC 2012


2012/2/21 冰淇淋 <453193368 at qq.com>:
> hi,:
> I am a new user of libvirt ,I asked a question about using libvirt to
> connect to esxi server. I got the answer is
> https://www.redhat.com/archives/libvir-list/2012-February/msg00860.html
>   So,I try to make the change on the mailing list you just added.
>  -     * Add a dummy expect header to stop CURL from waiting for a response
> code
>  +     * Add an empty expect header to stop CURL from waiting for a response
> code
>   -    curl->headers = curl_slist_append(curl->headers, "Expect: nothing");
>  +    curl->headers = curl_slist_append(curl->headers, "Expect:");
> and I did the follow steps in my computer:
> 1../configure --with-esx
> 2.make
> 3.make install
> 4../autogen.sh --prefix=$HOME/usr
> 5.make
> 6.make install
> I complete installing the libvirt and run the command :virsh --version  ,get
> the right answer 0.9.7
> and I run the command :virsh -c esx://me@exampe.com/?tansport=http
> the error before I mentioned related to http did disappeared ,but

Okay, this is good.

> and I still get a error like:error: internal error XPath evaluation of
> response for call to 'RetrieveServiceContent' failed

This is bad. This means that your ESXi server has send an response
that libvirt does not understand.

>  I don't understand what does this error mean,or is  my steps wrong ?so I
> hope you can help me to figure out the promble. thanks a lot and so sorry
> for trouble you too much .waiting for you reply on line.

I don't have enough information at hand to tell what is going wrong here.

You could provide more information by applying the attached patch to
your libvirt source code and recompile it. The patch enables complete
HTTP traffic logging. It makes libvirt output all its communication
with the ESXi server to the log.

Then run this command

LIBVIRT_DEBUG=1 LIBVIRT_LOG_OUTPUTS=1:file:esx_traffic.log virsh -c
esx://example.com/?transport=http

It'll output the debug information to a file named esx_traffic.log in
the current directory. If you mail me this log file I might be able to
figure out what the problem is.

Be aware that this log will contain your ESXi hostname, username and
password in clear text, so you might want to remove this information
from the log file before mailing it to the list.

> ps: I have another question about libvirt , I saw this :%if %{with_esx}%if
> 0%{?fedora} >= 9 || 0%{?rhel} >= 6 in /libvirt0.9.7/livirt.spec,I want to
> know if libvirt esx driver only can be useful on fedora>=9||rhel>=6,and the
> other OS like centos 6.0 or redhat ,will disable the use of esx driver of
> libvirt.

As Eric explained this is basically a policy decision and is not
related to any problems with the ESX driver on older Fedora or RHEL
version.

I think your specific problem is in your specific network and/or ESXi
server setup and the traffic log might allow to reveal and fix it.

Regards,
Matthias

> ------------------ 原始邮件 ------------------
> 发件人: "Matthias Bolte"<matthias.bolte at googlemail.com>;
> 发送时间: 2012年2月21日(星期二) 凌晨5:44
> 收件人: "冰淇淋"<453193368 at qq.com>;
> 抄送: "libvirt-users"<libvirt-users at redhat.com>;
> 主题: Re: [libvirt-users] the probelm in using libvirt to connect esx server
>
> 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
>
> _______________________________________________
> libvirt-users mailing list
> libvirt-users at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: esx_enable_traffic_debug.patch
Type: text/x-patch
Size: 384 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120221/e1437bf4/attachment.bin>


More information about the libvirt-users mailing list