I removed everything and rebuilt from scratch like what I did before (i.e. make  uninstall && rpm -e libvirt
    --nodeps && rpm -e libvirt-client
    --nodeps && ./autogen.sh
              --system && make && make install.) However, the libvirtd installed is not the one stored in the PATH. So it will have trouble finding it while typing "libvirtd start". I didn't change the environmental variables. Instead,  I removed everything and rebuilt it from scratch with all default settings  (i.e. make  uninstall && rpm -e libvirt
    --nodeps && rpm -e libvirt-client
    --nodeps && ./configure && make && make install.) to see what will happen. After rebuilt, the system can identify "libvirtd start", which means I can start libvirtd. Also I restarted xend. However, when I was running the "old" command "strace -o strace.txt virt-install --connect=xen:/// -p". Another error popped out, here is the running script:<br>
<br>]# strace -o strace.txt virt-install --connect=xen:/// -p<br>Traceback (most recent call last):<br>  File "/usr/bin/virt-install", line 33, in <module><br>    import virtinst<br>  File "/usr/lib/python2.6/site-packages/virtinst/__init__.py", line 35, in <module><br>
    import Storage<br>  File "/usr/lib/python2.6/site-packages/virtinst/Storage.py", line 48, in <module><br>    import libvirt<br>  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 25, in <module><br>
ImportError: No module named libvirtmod<br><br>Please find the strace.txt attached for this error. It seems that libvirtmod module is missing. I followed each step I did before but encountered this error for the first time. Could you see how can I let the service to find the module?<br>
<br>Thanks,<br><br><div class="gmail_quote">On Fri, Mar 16, 2012 at 12:07 PM, Su Zhang <span dir="ltr"><<a href="mailto:westlifezs@gmail.com" target="_blank">westlifezs@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<br><br><div class="gmail_quote"><div><div>On Fri, Mar 16, 2012 at 10:35 AM, Alex Jia <span dir="ltr"><<a href="mailto:ajia@redhat.com" target="_blank">ajia@redhat.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div><div>
<div><div>----- Original Message -----<br>
From: "Su Zhang" <<a href="mailto:westlifezs@gmail.com" target="_blank">westlifezs@gmail.com</a>><br>
To: "Alex Jia" <<a href="mailto:ajia@redhat.com" target="_blank">ajia@redhat.com</a>><br>
Cc: <a href="mailto:libvirt-users@redhat.com" target="_blank">libvirt-users@redhat.com</a>, "Eric Blake" <<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>><br>
Sent: Friday, March 16, 2012 10:52:32 PM<br>
Subject: Re: [libvirt-users] no connection driver available for No connection for URI xen:///<br>
<br>
<br>
<br>
<br>
On Fri, Mar 16, 2012 at 2:22 AM, Alex Jia < <a href="mailto:ajia@redhat.com" target="_blank">ajia@redhat.com</a> > wrote:<br>
<br>
<br>
<br>
<br>
On 03/16/2012 01:58 PM, Su Zhang wrote:<br>
<br>
<br>
<br>
<br>
On Fri, Mar 16, 2012 at 12:55 AM, Su Zhang < <a href="mailto:westlifezs@gmail.com" target="_blank">westlifezs@gmail.com</a> > wrote:<br>
<br>
<br>
<br>
<br>
<br>
<br>
On Fri, Mar 16, 2012 at 12:16 AM, Alex Jia < <a href="mailto:ajia@redhat.com" target="_blank">ajia@redhat.com</a> > wrote:<br>
<br>
<br>
<br>
<br>
On 03/16/2012 12:12 PM, Su Zhang wrote:<br>
<br>
Alex,<br>
<br>
I changed the symbolic link to "/usr/local/lib/libvirt.so.0.9.10". Here is the running script:<br>
<br>
[root@XenTester libvirt-0.9.10]# rm /usr/lib64/libvirt.so.0<br>
rm: remove symbolic link `/usr/lib64/libvirt.so.0'? yes<br>
[root@XenTester libvirt-0.9.10]# ln -s /usr/local/lib/libvirt.so.0.9.10 /usr/lib64/libvirt.so.0<br>
It's not enough, you had better to clean up your dirty libvirt environment, for example, remove all of<br>
libvirt rpm package on host, then recompile libvirt and ./configure --prefix=/usr && make && make install, or ./autogen --system && make && make install.<br>
<br>
<br>
I've already done make uninstall && ./autogen.sh --system && make && make install. However, while starting libvirtd, there is still an error here:<br>
<br>
<br>
Sorry I forgot the command line I used to start the libvirt service, here it is:<br>
<br>
[root@XenTester su]# /etc/rc.d/init.d/libvirtd start<br>
<br>
<br>
<br>
<br>
Starting libvirtd daemon: libvirtd: /usr/lib64/libvirt.so.0: version `LIBVIRT_PRIVATE_0.9.4' not found (required by libvirtd)<br>
libvirtd: /usr/lib64/libvirt.so.0: version `LIBVIRT_PRIVATE_0.9.4' not found (required by /usr/lib64/libvirt-qemu.so.0)<br>
[FAILED]<br>
<br>
Does it mean I cannot remove all of the libvirt binary by only running "make uninstall"?<br>
Are there any other ways can be used to remove the libvirt environment completely?<br>
As usual, 'make uninstall' should be okay, if your 0.9.4 is a libvirt rpm package installation, you may use 'rpm -e libvirt --nodeps' to<br>
remove it, also remove libvirt-client rpm package using the same method.<br>
<br>
<br>
<br>
<br>
<br>
Alex,<br>
<br>
I've done make uninstall, rpm -e libvirt --nodeps and rpm -e libvirt-client --nodeps before I rebuild ( ./autogen.sh --system && make && make install) the libvirt.<br>
It seems that the previous error has gone but warning is left:<br>
<br>
[root@XenTester su]# libvirtd start<br>
2012-03-16 14:37:04.511+0000: 29843: info : libvirt version: 0.9.10<br>
2012-03-16 14:37:04.511+0000: 29843: warning : virGetHostname:2108 : getaddrinfo failed for 'XenTester': Name or service not known<br>
<br>
<br>
</div></div>Su, the getaddrinfo() can get your hostname, it's just a warning not important, you can run 'hostname' and 'cat /etc/hosts' to<br>
check whether 'XenTester' host name is okay.<br>
<div><br>
<br>
Does this warning really matter? Are there anything returned by getaddrinfo will be used by guest OS?<br>
<br>
<br>
</div>The getaddrinfo() is a gnulib API, which is used for translating name of a service location and/or a service name<br>
to set of socket addresses, libvirt just call it by internal virGetHostname API. it's a host operation not guest.<br>
<div><br>
<br>
<br>
Besides, could you please confirm if the following running script suggest that Xen and libvirtd have been successfully connected?<br>
<br>
[root@XenTester libvirt-0.9.10]# virt-install -p<br>
ERROR<br>
--name is required<br>
--ram amount in MB is required<br>
--disk storage must be specified (override with --nodisks)<br>
An install method must be specified<br>
(--location URL, --cdrom CD/ISO, --pxe, --import, --boot hd|cdrom|...)<br>
<br>
<br>
</div>Su, yeah, it works well for you, 'man virt-install' will show some example about how to install a guest,<br>
or you also interaction mode using virt-install with --prompt.<br>
</div></div><div><div><br>
<br>
Thanks,<br>
<br>
Alex,<br></div></div></blockquote><div><br>    It initially run correctly. I can install a VM via this interactive installation mode once. However, it encountered another error while I was going to install with the same command another time. It seems that the sockets path has been changed. I checked that the default socket path is:  /usr/local/var/run/libvirt/libvirt-sock, but it seems that the service is looking for a socket located at '/var/run/libvirt/libvirt-sock' (see 'ERROR    Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory' in the following running script) . I searched at livirtd.conf file but cannot find a place to reset this socket path. Could you let me know how to get around this issue?<div>



<br>
<br>Here is the running script:<br><br><br></div>[root@XenTester libvirt-0.9.10]# libvirtd --help<br><br>Usage:<br>  libvirtd [options]<br><br>Options:<br>  -v | --verbose         Verbose messages.<br>  -d | --daemon          Run as a daemon & write PID file.<br>




  -l | --listen          Listen for TCP/IP connections.<br>  -t | --timeout <secs>  Exit after timeout period.<br>  -f | --config <file>   Configuration file.<br>     | --version         Display version information.<br>




  -p | --pid-file <file> Change name of PID file.<br><br>libvirt management daemon:<br><br>  Default paths:<br><br>    Configuration file (unless overridden by -f):<br>      /usr/local/etc/libvirt/libvirtd.conf<br>



<br>
    Sockets:<br>      /usr/local/var/run/libvirt/libvirt-sock<br>      /usr/local/var/run/libvirt/libvirt-sock-ro<br><br>    TLS:<br>      CA certificate:     /usr/local/etc/pki/CA/caert.pem<br>      Server certificate: /usr/local/etc/pki/libvirt/servercert.pem<br>




      Server private key: /usr/local/etc/pki/libvirt/private/serverkey.pem<br><br>    PID file (unless overridden by -p):<br>      /usr/local/var/run/libvirtd.pid<br><br>[root@XenTester libvirt-0.9.10]# virt-install --prompt<br>




ERROR    Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory<br><br>Thanks,<br><br><br><br></div><div><div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div><div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Thanks,<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
I run "strace -o strace.txt virt-install --connect=xen:/// -p" once again, and the following error came out:<br>
<br>
ERROR Error in network device parameters: Virtual network 'default' does not exist: this function is not supported by the connection driver: virNetworkLookupByName<br>
the strace.txt is attached.<br>
I think current xen URI works well for you, and you may try virt-install --connect=xen:/// -p -d or virt-install -p -d to confirm this.<br>
<br>
The above error is another issues, you need to change others stuff, it's not enough to just link<br>
/usr/local/lib/libvirt.so.0.9.10 /usr/lib64/libvirt.so.0, please follow answer 1.<br>
<br>
<br>
<br>
<br>
<br>
Are there any other places I need to change in order to let the system know I am running libvirt.so.0.9.10?<br>
<br>
<br>
Thanks,<br>
<br>
<br>
On Thu, Mar 15, 2012 at 10:54 PM, Su Zhang < <a href="mailto:westlifezs@gmail.com" target="_blank">westlifezs@gmail.com</a> > wrote:<br>
<br>
<br>
Here it is:<br>
<br>
# ll /usr/lib64/libvirt.so.0<br>
lrwxrwxrwx. 1 root root 16 Mar 12 21:19 /usr/lib64/libvirt.so.0 -> libvirt.so.0.9.4<br>
<br>
So you meant that I used a wrong libvirt.so? How can I correct this?<br>
<br>
<br>
<br>
<br>
On Thu, Mar 15, 2012 at 10:52 PM, Alex Jia < <a href="mailto:ajia@redhat.com" target="_blank">ajia@redhat.com</a> > wrote:<br>
<br>
<br>
<br>
<br>
<br>
On 03/16/2012 11:41 AM, Su Zhang wrote:<br>
<br>
<br>
<br>
<br>
On Thu, Mar 15, 2012 at 10:20 PM, Alex Jia < <a href="mailto:ajia@redhat.com" target="_blank">ajia@redhat.com</a> > wrote:<br>
<br>
<br>
<br>
<br>
<br>
On 03/16/2012 11:02 AM, Su Zhang wrote:<br>
<br>
<br>
<br>
<br>
On Thu, Mar 15, 2012 at 9:45 PM, Alex Jia < <a href="mailto:ajia@redhat.com" target="_blank">ajia@redhat.com</a> > wrote:<br>
<br>
<br>
<br>
<br>
On 03/16/2012 05:33 AM, Su Zhang wrote:<br>
<br>
<br>
<br>
<br>
On Thu, Mar 15, 2012 at 4:20 PM, Eric Blake < <a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a> > wrote:<br>
<br>
<br>
<br>
On 03/15/2012 02:57 PM, Su Zhang wrote:<br>
> Hi all,<br>
><br>
> I am trying to use virt-install to install domU image. However, I<br>
> encountered the following issue. It seems that a connection driver is<br>
> needed for Xen.<br>
> I am new to both libvirt and Xen. Anyone have any ideas on what's wrong<br>
> with the following error ?<br>
><br>
><br>
><br>
> # virt-install --connect=xen:/// -p -d<br>
> Thu, 15 Mar 2012 10:17:55 DEBUG Launched with command line:<br>
> /usr/bin/virt-install --connect=xen:/// -p -d<br>
> Thu, 15 Mar 2012 10:17:55 DEBUG Requesting libvirt URI xen:///<br>
> Thu, 15 Mar 2012 10:17:55 ERROR no connection driver available for No<br>
> connection for URI xen:///<br>
<br>
This probably means that your copy of libvirt.so and libvirtd was built<br>
without xen support. What does<br>
<br>
virsh --version=long<br>
<br>
say? Also, are you sure libvirtd is running?<br>
In addition, I want to know your libvirt.so, libvirtd, xend location, for example,<br>
# which libvirtd<br>
# which xend<br>
# locate libvirt.so<br>
<br>
Please also make sure xend service is running:<br>
# service xend status<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Eric Blake <a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a> <a href="tel:%2B1-919-301-3266" value="+19193013266" target="_blank">+1-919-301-3266</a><br>
Libvirt virtualization library <a href="http://libvirt.org" target="_blank">http://libvirt.org</a><br>
<br>
<br>
Eric,<br>
<br>
Here is the output:<br>
# virsh --version=long<br>
Virsh command line tool of libvirt 0.9.10<br>
See web site at <a href="http://libvirt.org/" target="_blank">http://libvirt.org/</a><br>
<br>
Compiled with support for:<br>
Hypervisors: Xen QEmu/KVM UML OpenVZ VirtualBox LXC Test<br>
Networking: Remote Daemon Network Bridging Nwfilter VirtualPort<br>
Storage: Dir Filesystem SCSI Multipath iSCSI LVM<br>
Miscellaneous: SELinux Secrets Debug<br>
<br>
It seems that it does support Xen.<br>
Yeah, Xen indeed appears in Hypervisors line.<br>
<br>
<br>
<br>
<br>
I am not sure if libvirtd is running so I use the following command to start it:<br>
<br>
[root@XenTester srv]# /etc/rc.d/init.d/libvirtd start<br>
Right, you may also use service libvirtd start, and check it by service libvirtd status or ps -ef|grep libvirtd.<br>
<br>
<br>
<br>
But the same error is still there.<br>
<br>
Am I using the right way to start libvirtd service? Are there any other possible reasons of this error?<br>
<br>
<br>
<br>
<br>
Thanks,<br>
<br>
--<br>
Su Zhang<br>
Ph.D Candidate<br>
Computing and Information Sciences<br>
Kansas State University<br>
_______________________________________________<br>
libvirt-users mailing list <a href="mailto:libvirt-users@redhat.com" target="_blank">libvirt-users@redhat.com</a> <a href="https://www.redhat.com/mailman/listinfo/libvirt-users" target="_blank">https://www.redhat.com/mailman/listinfo/libvirt-users</a><br>





Alex,<br>
<br>
Here is some information:<br>
<br>
# /etc/init.d/xencommons start<br>
Starting xenstored...<br>
Setting domain 0 name...<br>
Starting xenconsoled...<br>
[root@XenTester su]# /etc/init.d/xend start<br>
[root@XenTester su]# which libvirtd<br>
/usr/local/sbin/libvirtd<br>
[root@XenTester su]# which xend<br>
/usr/sbin/xend<br>
[root@XenTester su]# locate libvirt.so<br>
/usr/lib64/libvirt.so.0<br>
/usr/lib64/libvirt.so.0.9.4<br>
/usr/local/lib/libvirt.so<br>
/usr/local/lib/libvirt.so.0<br>
/usr/local/lib/libvirt.so.0.9.10<br>
You have 2 different libvirt versions 0.9.4 and 0.9.10, and your 0.9.10 is put under the<br>
/usr/local/lib directory, so I guess you haven't used ./configure with --prefix=/usr option<br>
or directly use ./autogen.sh --system when you configure and compile libvirt.<br>
<br>
And also please yum install strace -y if you haven't installed strace rpm, then run the following operation:<br>
<br>
# strace -o strace.txt virt-install --connect=xen:/// -p<br>
<br>
Then attach strace.txt as a attachment.<br>
<br>
Thanks,<br>
Alex<br>
<br>
<br>
<br>
Alex,<br>
<br>
Thanks. I have run ./autogen.sh --system. And "make" and "make install" the libvirt once again.<br>
I encountered one type of errors while running "make install", it seems that the installer is looking for a bunch of HTML files under /usr/bin/install. here is the error info:<br>
<br>
/usr/bin/install: cannot stat `./api.html': No such file or directory<br>
/usr/bin/install: cannot stat `./api_extension.html': No such file or directory<br>
/usr/bin/install: cannot stat `./apps.html': No such file or directory<br>
/usr/bin/install: cannot stat `./archdomain.html': No such file or directory<br>
/usr/bin/install: cannot stat `./architecture.html': No such file or directory<br>
/usr/bin/install: cannot stat `./archnetwork.html': No such file or directory<br>
/usr/bin/install: cannot stat `./archnode.html': No such file or directory<br>
(there are still tens of HTML files missing)<br>
....<br>
It's not important for our issues.<br>
<br>
<br>
<br>
<br>
<br>
<br>
Do you think this type of errors will affect the functionality of libvirt?<br>
Also, I checked and it seems that I've the latest strace package installed. So I run "strace -o strace.txt virt-install --connect=xen:/// -p".<br>
Please find strace.txt attached.<br>
I saw virt-install is opening /usr/lib64/libvirt.so.0 in strace.txt: open("/usr/lib64/libvirt.so.0", O_RDONLY) = 7 I want to confirm whether you're using compiling libvirt 0.9.10,<br>
ll /usr/lib64/libvirt.so.0 say what?<br>
<br>
Thanks,<br>
Alex<br>
<br>
<br>
<br>
<br>
<br>
<br>
Thanks,<br>
<br>
<br>
<br>
<br>
<br>
<br>
[root@XenTester su]# service xend status<br>
[root@XenTester su]# ps -ef|grep libvirtd<br>
root 2242 1 0 21:52 ? 00:00:00 libvirtd --daemon<br>
root 3295 3112 0 21:59 pts/0 00:00:00 grep libvirtd<br>
<br>
Can you see if it is normal here?<br>
<br>
Thanks,<br>
<br>
<br>
--<br>
Su Zhang<br>
Ph.D Candidate<br>
Computing and Information Sciences<br>
Kansas State University<br>
<br>
<br>
<br>
<br>
--<br>
Su Zhang<br>
Ph.D Candidate<br>
Computing and Information Sciences<br>
Kansas State University<br>
<br>
<br>
<br>
<br>
--<br>
Su Zhang<br>
Ph.D Candidate<br>
Computing and Information Sciences<br>
Kansas State University<br>
<br>
<br>
<br>
--<br>
Su Zhang<br>
Ph.D Candidate<br>
Computing and Information Sciences<br>
Kansas State University<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Su Zhang<br>
Ph.D Candidate<br>
Computing and Information Sciences<br>
Kansas State University<br>
<br>
<br>
<br>
--<br>
Su Zhang<br>
Ph.D Candidate<br>
Computing and Information Sciences<br>
Kansas State University<br>
<br>
<br>
<br>
<br>
--<br>
Su Zhang<br>
Ph.D Candidate<br>
Computing and Information Sciences<br>
Kansas State University<br>
</div></div></blockquote></div></div></div><div><div><br><br clear="all"><br>-- <br>Su Zhang<br>Ph.D Candidate<br>Computing and Information Sciences<br>Kansas State University<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Su Zhang<br>Ph.D Candidate<br>Computing and Information Sciences<br>Kansas State University<br>