[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] Error: unable to connect to '/var/run/libvirt/libvirt-sock'



Hi,
I recompile the libvirt-0.9.0 with "./configure --prefix=/usr --libdir=/usr/lib64 --localstatedir=/var --sysconfdir=/etc "
in both the dell optiplex 780 and Xeon(R) E5620,find that in the dell 780 shows:

root Optiplex-780:/home/qinguan# virsh
error:unable to connect to '/usr/local/var/run/libvirt/libvirt-sock', libvirtd may need to be started: 没有那个文件或目录(no such file or directory )
error:连接到管理程序失败(failed to connect the monitor)
root Optiplex-780:/home/qinguan# /usr/local/sbin/libvirtd -d
root Optiplex-780:/home/qinguan# virsh
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh #
root Optiplex-780:/home/qinguan# virsh --version
0.9.0
root Optiplex-780:/home/qinguan#
××××××××××××××××××××××××××××××××
In Xeon E5620,it's OK , but I still can't connect the VM running on the E5620 from dell 780 by "virt-viewer -c qemu+ssh://192.168.7.126/system ubuntu" or "virsh -c qemu+ssh://root 192 168 7 126/system".


best regards,
qinguan



2011/5/5 Daniel P. Berrange <berrange redhat com>
On Thu, May 05, 2011 at 08:07:30PM +0800, guan qin wrote:
> Hi,
> I meet with the problem that "Error: unable to connect to
> '/var/run/libvirt/libvirt-sock' ".
> I do as  Error: unable to connect to '/var/run/libvirt/libvirt-sock'
> <http://wiki.libvirt.org/page/FAQ#Error:_unable_to_connect_to_.27.2Fvar.2Frun.2Flibvirt.2Flibvirt-sock.27>said
> but never worked:
>
> root shahe26:~# virsh
> error: unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may
> need to be started: No such file or directory
> error: failed to connect to the hypervisor
> root shahe26:~# ls /usr/lib64 | grep libvirt
> libvirt
> libvirt.a
> libvirt.la
> libvirt-qemu.a
> libvirt-qemu.la
> libvirt-qemu.so
> libvirt-qemu.so.0
> libvirt-qemu.so.0.8.3
> libvirt-qemu.so.0.9.0
> libvirt.so
> libvirt.so.0
> libvirt.so.0.8.3
> libvirt.so.0.9.0
> root shahe26:~# ls /usr/lib32 | grep libvirt
> root shahe26:~# /etc/init.d/libvirt-bin restart
> Restarting libvirt management daemon: /usr/sbin/libvirtd.
> root shahe26:~# virsh
> error: unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may
> need to be started: No such file or directory
> error: failed to connect to the hypervisor
> root shahe26:~#
>
> I install the libvirt as follows:
> #./configure --prefix=/usr --libdir=/usr/lib64

You're missing   --localstatedir=/var --sysconfdir=/etc

> #make
> #make install
>


Regards,
Daniel
--
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]