<font class="Apple-style-span" face="verdana, sans-serif"><div><font class="Apple-style-span" face="verdana, sans-serif">Thanks Daniel. After installing xen-devel and rebuilding libvirt, the sample program worked.</font></div>

<div><font class="Apple-style-span" face="verdana, sans-serif"><br></font></div><div><font class="Apple-style-span" face="verdana, sans-serif">-Ganesh</font></div></font><div><div><font class="Apple-style-span" face="verdana, sans-serif"><div>

<br></div></font><div><div class="gmail_quote">On Wed, Apr 14, 2010 at 2:48 PM, Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com">berrange@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div></div><div class="h5">On Tue, Apr 13, 2010 at 11:37:01PM +0530, Ganesh Pagade wrote:<br>
> Hi,<br>
><br>
> I downloaded and built the latest libvirt source code 0.8. I installed the<br>
> library in a custom directory libvirt-0.8.0-install/ keeping all other<br>
> configurations default.<br>
><br>
> After this I tried to execute the example hellolibvirt:<br>
><br>
> [hellolibvirt]# ./hellolibvirt xen<br>
> Attempting to connect to hypervisor<br>
> libvir: Remote error : unable to connect to<br>
> '/root/ganeshp/libvirt-0.8.0-install/var/run/libvirt/libvirt-sock', libvirtd<br>
> may need to be started: Connection refused<br>
> No connection to hypervisor<br>
> Parameter error when attempting to get last error<br>
><br>
> My libvirtd was running from /etc/init.d/libvirtd. Still why is it trying to<br>
> connect to the newly built libvirtd?<br>
><br>
> I stopped the /etc/init.d/libvirtd and started my newly built daemon:<br>
> [hellolibvirt]# /root/ganeshp/libvirt-0.8.0-install/sbin/libvirtd start &<br>
> 04:47:07.534: warning : qemudStartup:1574 : Unable to create cgroup for<br>
> driver: No such device or address<br>
> 04:47:07.540: error : parse_socket:126 : cannot open<br>
> /sys/devices/system/cpu/cpu1/topology/physical_package_id: No such file or<br>
> directory<br>
> 04:47:07.540: warning : qemudCapsInit:1068 : Failed to get host CPU<br>
> 04:47:07.544: warning : lxcStartup:1835 : Unable to create cgroup for<br>
> driver: No such device or address<br>
><br>
> After this I tried running hellolibvirt example again:<br>
> [hellolibvirt]# ./hellolibvirt xen<br>
> Attempting to connect to hypervisor<br>
> 04:48:43.166: error : virLibConnError:450 : no hypervisor driver available<br>
> for xen:///<br>
> libvir: error : no hypervisor driver available for xen:///<br>
> libvir: error : no hypervisor driver available for xen:///<br>
<br>
</div></div>This means you have built libvirt without Xen support. It should have told<br>
you after you ran 'configure' which drivers were enabled.<br>
<br>
Daniel<br>
<font color="#888888">--<br>
|: Red Hat, Engineering, London    -o-   <a href="http://people.redhat.com/berrange/" target="_blank">http://people.redhat.com/berrange/</a> :|<br>
|: <a href="http://libvirt.org" target="_blank">http://libvirt.org</a> -o- <a href="http://virt-manager.org" target="_blank">http://virt-manager.org</a> -o- <a href="http://deltacloud.org" target="_blank">http://deltacloud.org</a> :|<br>


|: <a href="http://autobuild.org" target="_blank">http://autobuild.org</a>        -o-         <a href="http://search.cpan.org/~danberr/" target="_blank">http://search.cpan.org/~danberr/</a> :|<br>
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|<br>
</font></blockquote></div><br></div></div></div>