<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div>doesn't work for me(with curl 7.15 and ESX4i)</div><div><br></div><div><div>[root@rain8 libvirt]# virsh -c esx://172.30.8.63?no_verify=1</div><div>Enter username for 172.30.8.63 [root]:</div><div>Enter root password for 172.30.8.63:</div><div>error: internal error curl_easy_perform() returned an error: SSL peer certificate was not ok (51)</div><div>error: failed to connect to the hypervisor</div><div><br></div><div>I had to set(unset) <span class="Apple-style-span" style="font-family: -webkit-monospace; font-size: 13px; white-space: pre; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">CURLOPT_SSL_VERIFYHOST in order to connect:</span></div><div><font class="Apple-style-span" face="-webkit-monospace" size="3"><span class="Apple-style-span"
 style="font-size: 13px; white-space: pre; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><div>--- a/src/esx/esx_vi.c</div><div>+++ b/src/esx/esx_vi.c</div><div>@@ -239,6 +239,7 @@ esxVI_Context_Connect(virConnectPtr conn, esxVI_Context *ctx, const char *url,</div><div>     curl_easy_setopt(ctx->curl_handle, CURLOPT_HEADER, 0);</div><div>     curl_easy_setopt(ctx->curl_handle, CURLOPT_FOLLOWLOCATION, 1);</div><div>     curl_easy_setopt(ctx->curl_handle, CURLOPT_SSL_VERIFYPEER, noVerify ? 0 : 1);</div><div>+    curl_easy_setopt(ctx->curl_handle, CURLOPT_SSL_VERIFYHOST, noVerify ? 0 : 1);</div><div>     curl_easy_setopt(ctx->curl_handle, CURLOPT_COOKIEFILE, "");</div><div>     curl_easy_setopt(ctx->curl_handle, CURLOPT_HTTPHEADER, ctx->curl_headers);</div><div>     curl_easy_setopt(ctx->curl_handle,
 CURLOPT_WRITEFUNCTION,</div><div>----</div><div><br></div><div>[root@rain8 libvirt]# virsh -c esx://172.30.8.63?no_verify=1
Enter username for 172.30.8.63 [root]:
Enter root password for 172.30.8.63:
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # list
 Id Name                 State
----------------------------------
 16 rh53                 running
160 Rhel-server 5_3      running

virsh # </div><div><br></div></span></font></div></div><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><br><div style="font-family:arial, helvetica, sans-serif;font-size:13px"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Matthias Bolte <matthias.bolte@googlemail.com><br><b><span style="font-weight: bold;">To:</span></b> Shahar Klein <shaharklein@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> Tom Hughes <tom@compton.nu>; libvir-list@redhat.com<br><b><span style="font-weight: bold;">Sent:</span></b> Monday, July 27, 2009 3:41:16 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [libvirt] VMware support and libcurl on rhel-u1<br></font><br>2009/7/27 Shahar Klein <<a ymailto="mailto:shaharklein@yahoo.com" href="mailto:shaharklein@yahoo.com">shaharklein@yahoo.com</a>>:<br>> apperantly I needed to unset
 CURLOPT_SSL_VERIFYHOST as well<br>> patched that and it is working now<br>> 10x<br>> Shahar<br><br>With latest git HEAD you should be able to connect using<br><br>virsh -c esx://rain3?no_verify=1<br><br>Regards,<br>  Matthias<br></div></div><div style="position:fixed"></div></div><br>



      </body></html>