[libvirt-users] Failed to connect socket to '/usr/local/libvirt/var/run/libvirt/libvirt-sock':

Eric Blake eblake at redhat.com
Tue Oct 30 15:49:41 UTC 2012


On 10/30/2012 08:30 AM, 何鑫 wrote:
> Hi all,

Hello,

[can you please convince your mailer to wrap long lines - it was very
awkward to read this]

>    When I tend to use "virsh # connect qemu:///system", the debug info shown below:Failed to connect socket to '/usr/local/libvirt/var/run/libvirt/libvirt-sock': No such file or directory

Sounds like you are mixing self-compiled binaries with system binaries,
and that the two have different ideas (based on the options used at
./configure time) of where files should live.  To fix this, you need to
either make sure your self-compiled binary uses the same ./configure
options as what your distro would use (if you self-build from
libvirt.git on Fedora, './autogen.sh --system' will help in this regard,
although so far no one has submitted patches for that to work on
Ubuntu).  Or you need to make sure that EVERYTHING you are using is from
your self-compiled version, which means using your self-compiled virsh
(and not the distro virsh) for connecting to the self-compiled libvirtd.
 Also, are you sure you started your self-built libvirtd as a daemon?

>     I use libvirt-bin's file "libvirt-sock" linking to the directory(usr/local/libvirt/var/run/libvirt) where virsh needs to search it, then the problem solved.     But I need to debug libvirt with gdb tracing libvirt's source code, to avoid the effects of libvirt-bin, I should remove libvirt-bin. As a result, the symbolic of libvirt-sock is missed.    Also I can't copy "libvirt-sock", because "cp: cannot open `/var/run/libvirt/libvirt-sock' for reading: No such device or address".

Correct, you can't copy sockets, especially since the socket should only
exist while libvirtd is running.

>     So could you please give me some advise to add the file "libvirt-sock" after the source installation in ubuntu?      Thanks a lot!
>   Corey 		 	   		  
> 
> 
> 
> _______________________________________________
> libvirt-users mailing list
> libvirt-users at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-users
> 

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20121030/99006891/attachment.sig>


More information about the libvirt-users mailing list