<DIV><includetail>hi,:</includetail></DIV>
<DIV>I am a new user of libvirt ,I asked a question about using libvirt to connect to esxi server. I got the answer is <A href="https://www.redhat.com/archives/libvir-list/2012-February/msg00860.html">https://www.redhat.com/archives/libvir-list/2012-February/msg00860.html</A></DIV>
<DIV>
<DIV style="COLOR: #000">
<DIV>  So,I try to make the change on the mailing list you just added.</DIV>
<DIV><FONT color=#ff0000> -     * Add a dummy expect header to stop CURL from waiting for a response code</FONT></DIV>
<DIV><FONT color=#ff0000> +     * Add an empty expect header to stop CURL from waiting for a response code<BR></FONT><FONT color=#000000><FONT color=#ff0000>  -    curl->headers = curl_slist_append(curl->headers, "Expect: nothing");<BR> +    curl->headers = curl_slist_append(curl->headers, "Expect:");<BR></FONT></FONT>and I did the follow steps in my computer:</DIV>
<DIV>
<DIV><FONT style="BACKGROUND-COLOR: #ffffff" color=#ff0000>1../configure --with-esx</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #ffffff" color=#ff0000>2.make</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #ffffff" color=#ff0000>3.make install</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #ffffff" color=#ff0000>4../autogen.sh --prefix=$HOME/usr</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #ffffff" color=#ff0000>5.make</FONT></DIV>
<DIV><FONT style="BACKGROUND-COLOR: #ffffff" color=#ff0000>6.make install </FONT></DIV>
<DIV>I complete installing the libvirt and run the command :<FONT color=#ff0000>virsh --version  </FONT>,get the right answer 0.9.7</DIV>
<DIV>and I run the command <FONT color=#ff0000>:virsh -c esx://me@exampe.com/?tansport=http  </FONT></DIV>
<DIV><FONT color=#000000>the error before I mentioned related to http did disappeared ,but </FONT></DIV>
<DIV><FONT color=#ff0000><FONT color=#000000>and I still get a error like:</FONT>error: internal error XPath evaluation of response for call to 'RetrieveServiceContent' failed<BR> </FONT><FONT color=#000000>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.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#993300>ps:</FONT> I have another question about libvirt , I saw this <FONT color=#008080>:%if %{with_esx}%if 0%{?fedora} >= 9 || 0%{?rhel} >= 6 </FONT><FONT color=#000000>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.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#000000>thanks again.</FONT></DIV>
<DIV>best regards!</DIV>
<DIV style="COLOR: #000">
<DIV style="PADDING-BOTTOM: 2px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: Arial Narrow; FONT-SIZE: 12px; PADDING-TOP: 2px">------------------ 原始邮件 ------------------</DIV>
<DIV style="PADDING-BOTTOM: 8px; PADDING-LEFT: 8px; PADDING-RIGHT: 8px; BACKGROUND: #efefef; FONT-SIZE: 12px; PADDING-TOP: 8px">
<DIV id=menu_sender><B>发件人:</B> "Matthias Bolte"<matthias.bolte@googlemail.com>;</DIV>
<DIV><B>发送时间:</B> 2012年2月21日(星期二) 凌晨5:44</DIV>
<DIV><B>收件人:</B> "冰淇淋"<453193368@qq.com>; <WBR></DIV>
<DIV><B>抄送:</B> "libvirt-users"<libvirt-users@redhat.com>; <WBR></DIV>
<DIV><B>主题:</B> Re: [libvirt-users] the probelm in using libvirt to connect esx server</DIV></DIV>
<DIV> </DIV>2012/2/20 冰淇淋 <453193368@qq.com>:<BR>> hi,<BR>> I am a new user of libvirt ,i really appreciate libvirt,and want to use it<BR>> in my work.I want to use it to conncet to a ESXi server.when I try to<BR>> connect to the server ,I use the command :virsh -c<BR>> esx://name@exmaple.com,And I get an<BR>><BR>> 1.error :error: internal error curl_easy_perform() returned an error:<BR>> Couldn't connect to server (7) : couldn't connect to host<BR>>  so I think maybe the firewall shutdown the 443 for https,so I used<BR>> command:virsh -c esx://name@example.com/?transport=http And I still get an<BR>> error like:<BR>> error: internal error HTTP response code 417 for call to<BR>> 'RetrieveServiceContent'<BR>> error: failed to connect to the hypervisor<BR><BR>HTTP error code 417 is related to the Expect header. The error<BR>indicates that the server or a proxy in between doesn't handle the<BR>Expect header. I assume that the ESXi sever itself is not the problem,<BR>because it works for me here. Maybe there is a HTTP proxy between your<BR>computer and the ESXi server that returns this 417 error code.<BR><BR>This problem is probably related to libvirt sending a dummy Expect<BR>header instead of sending no Expect at all.<BR><BR>If you're building libvirt from source you can try this patch that I<BR>just send to the mailing list for review<BR><BR>https://www.redhat.com/archives/libvir-list/2012-February/msg00860.html<BR><BR>It fixes the Expect header problem and might fix your connection problem.<BR><BR>-- <BR>Matthias Bolte<BR>http://photron.blogspot.com<BR></DIV></DIV></DIV></:includetail></DIV>