<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial; font-size: 12pt; color: #000000'><P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>Greetings:</FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT> </P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>I have an issue with connecting to the esx hypervisor from my guest Vm. The purpose of the connection is to obtain host related information (like network, devices etc).</FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri></FONT> </P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>I am not sure what is it that rejects the connect at the server side, and what i am missing. </FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>I am running lib0.7.5, i have libvirtd running on guest-vm.</FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>The host ESX has the ip address a.b.c.d.</FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri> </FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>Any thoughts?<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri> </FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri>Below the error with some debug output from libvirt.</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri></FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri></FONT> </P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>root > virsh -c esx://a.b.c.d/system<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri> ......................</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.065: debug : virConnectOpenAuth:1337 : name=esx://10.59.56.109/system, auth=0xb80ac638, flags=0<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.065: debug : do_open:1106 : name "esx://10.59.56.109/system" to URI components:<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri><SPAN style="mso-spacerun: yes">  </SPAN>scheme esx<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri><SPAN style="mso-spacerun: yes">  </SPAN>opaque (null)<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri><SPAN style="mso-spacerun: yes">  </SPAN>authority (null)<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri><SPAN style="mso-spacerun: yes">  </SPAN>server 10.59.56.109<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri><SPAN style="mso-spacerun: yes">  </SPAN>user (null)<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri><SPAN style="mso-spacerun: yes">  </SPAN>port 0<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri><SPAN style="mso-spacerun: yes">  </SPAN>path /system<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri> </FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.065: debug : do_open:1116 : trying driver 0 (Test) ...<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.066: debug : do_open:1122 : driver 0 Test returned DECLINED<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.066: debug : do_open:1116 : trying driver 1 (Xen) ...<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.066: debug : do_open:1122 : driver 1 Xen returned DECLINED<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.066: debug : do_open:1116 : trying driver 2 (OPENVZ) ...<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.066: debug : do_open:1122 : driver 2 OPENVZ returned DECLINED<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.066: debug : do_open:1116 : trying driver 3 (VBOX) ...<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.066: debug : do_open:1122 : driver 3 VBOX returned DECLINED<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.066: debug : do_open:1116 : trying driver 4 (remote) ...<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.067: debug : doRemoteOpen:564 : proceeding with name = esx:///system<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.069: debug : initialise_gnutls:1145 : loading CA file /etc/pki/CA/cacert.pem<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.070: debug : initialise_gnutls:1158 : loading client cert and key from files /etc/pki/libvirt/clientcert.pem and /etc/pki/libvirt/private/clientkey.pem<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.074: debug : do_open:1122 : driver 4 remote returned ERROR<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.074: debug : virUnrefConnect:259 : unref connection 0x903e078 1<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>17:06:16.074: debug : virReleaseConnect:216 : release connection 0x903e078<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><SPAN style="COLOR: red"><FONT face=Calibri>error: unable to connect to libvirtd at a.b.c.d': Connection refused<o:p></o:p></FONT></SPAN></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>error: failed to connect to the hypervisor<o:p></o:p></FONT></P>
<P> </P>
<P> </P>
<P>I tried to use uri like: <FONT face=Calibri>esx://a.b.c.d/, esx://a.b.c.d, esxi://a.b.c.d/system etc. They all give same issue.</FONT></P>
<P> </P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>Thanks.</FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri> </FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT face=Calibri>Antonela<o:p></o:p></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT face=Calibri> </FONT></o:p></P></div></body></html>