<div class="gmail_quote">2011/7/19 sharmila radha krishnan <span dir="ltr"><<a href="mailto:sharmilaradhakrishnan@rediffmail.com">sharmilaradhakrishnan@rediffmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>Hi,</div>
<div> I was finally able to connect to the xenapi hypervisor.  However, once I connect to virsh and give a 'quit' command I get  "* glibc detected *** virsh: double free or corruption (fasttop):". Please find below the actual memory dump.</div>

<div></div></blockquote><div> <br>I looked at the XenAPI driver and found a double-free problem, based on the minimal stacktrace glibc provided. Here's a patch for this. I'd be glad if you could test it, as I don't have a XenAPI setup at hand.<br>
<br>  <a href="https://www.redhat.com/archives/libvir-list/2011-July/msg01543.html">https://www.redhat.com/archives/libvir-list/2011-July/msg01543.html</a><br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div><b><i>Note:</i></b> I have disabled the SSL certificate verification in xenapi_driver.c by setting curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0) & curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0).</div>
</blockquote><div><br>No need to edit the code for this. You can pass the no_verify option in the connection URI to achieve this<br><br>  virsh -c xenapi://localhost/?no_verify=1<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div> Moreover, Iam not able to start any VMs uisng xencenter after i have started using virsh. It says,  <b>Error: Starting VM 'XenServer SDK 5.6.100-47101p import' - Internal error: another frontend device is already connected to this domain (frontend (domid=0 | kind=vbd | devid=51712); backend (domid=0 | kind=vbd | devid=51712)).</b> Even a reboot of the machine didnt help.</div>
</blockquote><div><br>Sorry, I've no idea what the problem could be here.<br><br>Matthias<br></div><div><br><br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div>Any pointers on the above 2 issues would be of great help.</div>
<div> </div>
<div>Thanks in Advance!</div>
<div> </div>
<div>Regards,</div>
<div>Sharmila</div>
<div> </div>
<div>From: "G Naresh Kumar"<a href="mailto:naresh.gadepalli@gmail.com" target="_blank">naresh.gadepalli@gmail.com</a></div>
<div>Sent: Sat, 16 Jul 2011 16:55:16 +0530</div>
<div>To: Matthias Bolte <a href="mailto:matthias.bolte@googlemail.com" target="_blank">matthias.bolte@googlemail.com</a></div>
<div>Cc: <a href="mailto:libvirt-users@redhat.com" target="_blank">libvirt-users@redhat.com</a></div>
<div>Subject: Re: [libvirt-users] Is libvirt supported on Citrix Xenserver?</div>
<div> </div>
<div>Hi Matthias,</div>
<div>
<div>></div></div>
<div>
<p></p>
<p>Sorry for the <a href="http://confusion.It" target="_blank">confusion.It</a> was an edited one & hence thetypo. Below is the </p><div class="im">
<p>actual output:</p>
<p></p>
<p># virsh -c xenapi://<myip></p>
<p>Enter username for <myip>: root</p>
<p>Enter root's password for <myip>: </p>
<p>error: authentication failed: (null)</p>
<p></p>
</div><p>I was not able to get anything in the Xen logs. Somehowfigured out to print </p><div class="im">
<p>the Xen error using the patch given at the link <a href="http://osdir.com/ml/libvir-" target="_blank">http://osdir.com/ml/libvir-</a></p>
<p>list/2011-06/msg00298.html. It prints"TRANSPORT_FAULT". Any pointers to this </p>
</div><p>error would be much appreciated. Iam also trying to debugthis issue.</p><div class="im">
<p></p>
<p>As per your suggestion,</p>
<p>I had used make rpm. But it requires xen-devel pacakge,which I was </p>
</div><p>not able to get for Xen 3.4.2. Is there any way where I canuse the source </p><div><div></div><div class="h5">
<p>package and build & install the library without using'make rpm' ? </p>
<p></p>
<p>Thanks for all the help.</p>
<p>
</p><div>></div>
<p>Regards</p>
<p>Naresh</p>
<div>> </div>
<div>On Thu, Jul 14, 2011 at 7:07 PM, Matthias Bolte <span dir="ltr"><<a>matthias.bolte@googlemail.com</a>></span> wrote: 
<div>> </div>
<blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex">2011/7/14 G Naresh Kumar <<a>naresh.gadepalli@gmail.com</a>>: 
<div>>> Hi Maththias,</div>
<div>> </div>
<div>> Thanks for the help. I finally was able to compile/install libvirt on 
<div>>> xenserver.</div>
<div>>></div>
<div>>> I tried compiling the libvirt 0.9.2 with xen api support. Was able to</div>
<div>>> install it successfully. When I tried giving the virsh command, I got an</div>
<div>>> ‘authentication failed’ error as shown below.</div>
<div>>></div>
<div>>> # virsh -c xenapi://<my local ip></div>
<div>>> Enter username for <mylocalip>: root</div>
<div>></div>
<div>></div></div>Here you entered root 
<div>> </div>
<div>
<div>>> Enter intel123's password for <my local ip>:</div>
<div>></div>
<div>></div></div>but here it asks for intel123's, that's unexpected. Did you edit this 
<div>>one before mailing it, or is there really this mismatch?</div>
<div>></div>
<div>>> error: authentication failed: (null)</div>
<div>></div>
<div>>Outputting (null) here is actually a bug. The only way this can happen</div>
<div>>is when the login attempt fails but the XenServer doesn't provide an</div>
<div>>error message. Maybe have a look at the XenServer logs to see if it</div>
<div>>says something about a failed login attempt.</div>
<div>> </div>
<div>
<div>>> I also tried connecting to the local machine as below,</div>
<div>>></div>
<div>>> virsh -c "xenapi:///"</div>
<div>>> error: authentication failed: Server name not in URI</div>
<div>>> error: failed to connect to the hypervisor</div>
<div>></div>
<div>></div></div>The XenAPI driver expects a server name. xenapi:/// _could_ be treated 
<div>>as xenapi://localhost, but it's not implemented that way.</div>
<div>> </div>
<div>
<div>>> Also I am trying to install ruby-libvirt on xenserver, which looks like</div>
<div>>> requires libvirt-devel package to be installed. How do I build it from the</div>
<div>>> libvirt 0.9.2 source package.</div>
<div>></div>
<div>></div></div>Running 'make rpm' should build an libvirt-devel RPM package for you. 
<div>> </div>
<div>
<div></div>
<div>
<div>>> Thanks,</div>
<div>>></div>
<div>>> Naresh</div>
<div>>></div>
<div>>> On Wed, Jun 15, 2011 at 8:19 PM, Matthias Bolte</div>
<div>>> <<a>matthias.bolte@googlemail.com</a>> wrote:</div>
<div>>>></div>
<div>>>> 2011/6/15 G Naresh Kumar <<a>naresh.gadepalli@gmail.com</a>>:</div>
<div>>>> > Hi Maththias,</div>
<div>>>> ></div>
<div>>>> > Thanks a lot for your response!.</div>
<div>>>> ></div>
<div>>>> > Is there a specific version of libvirt from which xenserver support is</div>
<div>>>> > added? I am getting the below error</div>
<div>>>> ></div>
<div>>>> > "error: invalid argument in libvirt was built without the 'xenapi'</div>
<div>>>> > driver"</div>
<div>>>></div>
<div>>>> The means that your libvirt version is new enough and contains the</div>
<div>>>> XenAPI driver but that it was disabled on configure time, probably</div>
<div>>>> because the build server didn't have libxenserver installed and</div>
<div>>>> libvirt's configure script automatically disabled the driver because</div>
<div>>>> of a missing dependency.</div>
<div>>>></div>
<div>>>> > I have installed libvirt from citrix yum repo.</div>
<div>>>></div>
<div>>>> Then Citrix build libvirt without XenAPI support. As a long term</div>
<div>>>> solution you could report to whom ever is responsible for that repo</div>
<div>>>> and request to enabled XenAPI support in that libvirt package. As a</div>
<div>>>> short term solution you could build libvirt from source yourself and</div>
<div>>>> make sure to get the XenAPI driver enabled.</div>
<div>>>></div>
<div>>>> > I am using Xenserver 5.5 with libvirt 0.8.2 and it does not seem to be</div>
<div>>>> > working.</div>
<div>>>></div>
<div>>>> According to <a href="http://libvirt.org/hvsupport.html" target="_blank">http://libvirt.org/hvsupport.html</a> and the error message</div>
<div>>>> 0.8.2 is new enough.</div>
<div>>>></div>
<div>>>> Matthias</div>
<div>>>></div>
<div>>>> > Thanks,</div>
<div>>>> ></div>
<div>>>> > Naresh</div>
<div>>>> ></div>
<div>>>> > On Jun 15, 2011 7:03 PM, "Matthias Bolte"</div>
<div>>>> > <<a>matthias.bolte@googlemail.com</a>></div>
<div>>>> > wrote:</div>
<div>>>> >> 2011/6/15 G Naresh Kumar <<a>naresh.gadepalli@gmail.com</a>>:</div>
<div>>>> >>> Hi,</div>
<div>>>> >>> Is libvirt supported on Citrix Xenserver. I have been searching for</div>
<div>>>> >>> the</div>
<div>>>> >>> same</div>
<div>>>> >>> with little/no luck.</div>
<div>>>> >>> If supported, can you point to some links/documents which can help me</div>
<div>>>> >>> try</div>
<div>>>> >>> out the same.</div>
<div>>>> >>> Thanks,</div>
<div>>>> >>> Naresh</div>
<div>>>> >></div>
<div>>>> >> libvirt can use XenAPI via libxenserver [1]. That should allow you to</div>
<div>>>> >> use libvirt with a Citrix XenServer. You can use virsh like this</div>
<div>>>> >> assuming you have a libxenserver enabled libvirt:</div>
<div>>>> >></div>
<div>>>> >> virsh -c xenapi://my-xen-server</div>
<div>>>> >></div>
<div>>>> >> But it's true, there is no documentation about this on the libvirt</div>
<div>>>> >> website</div>
<div>>>> >> yet.</div>
<div>>>> >></div>
<div>>>> >> [1] <a href="http://community.citrix.com/display/xs/Download+SDKs" target="_blank">http://community.citrix.com/display/xs/Download+SDKs</a></div>
<div>>>> >></div>
<div>>>> >> --</div>
<div>>>> >> Matthias Bolte</div>
<div>>>> >> <a href="http://photron.blogspot.com" target="_blank">http://photron.blogspot.com</a></div>
<div>>>> ></div>
<div>>> --</div>
<div>>> I was an atheist till I realized I am GOD</div>
<div>>></div>
<div>></div>
<div>></div></div></div>-- 
<div>> </div>
<div>
<div></div>
<div>Matthias Bolte 
<div>><a href="http://photron.blogspot.com" target="_blank">http://photron.blogspot.com</a></div>
<div>></div></div></div></blockquote></div>
<div>></div>
<div clear="all"> </div>
<div>>-- </div>
<div>>I was an atheist till I realized I am GOD</div>
<div>></div></div></div></div>
</blockquote></div>