[libvirt] unix_sock_dir for virtlogd

Mathieu Tarral mathieu.tarral at gmail.com
Fri May 4 00:07:41 UTC 2018


Hi,

thanks for your reply Martin,

2018-05-04 1:44 GMT+03:00 Martin Kletzander <mkletzan at redhat.com>:
> On Thu, May 03, 2018 at 11:03:48PM +0300, Mathieu Tarral wrote:
>>
>> Hi !
>>
>> I'm trying to run libvirtd from git, and the daemon is starting now,
>> but when i try to start a VM (using virt-manager) it complains that
>> virtlogd socket is unreachable.
>>
>> The problem is that it tries to reach it at the following location:
>>
>> virNetSocketNewConnectUNIX:713 : Failed to connect socket to
>> '/home/tarrma/usr/var/run/libvirt/virtlogd-sock': Connection refused
>>
>> however, i specified in my $HOME/usr/etc/libvirt/libvirtd.conf
>>
> How did you came up with this path?
>> unix_sock_dir = "/var/run/libvirt"
>>
>> Then why virt-manager is not using the socket from
>> /var/run/libvirt/virtlogd.sock ??
>>
>> Any ideas, where i misconfigured my installation ?
>>
>
> What did you specify as a prefix when building from git?  Did you do
> `./autogen.sh --system`?  Or used some custom prefix?

I followed the instructions here:
https://libvirt.org/compiling.html

And as I didn't wanted to replace my Debian binaries, i opted for the
$HOME/usr prefix:

./autogen.sh --prefix=$HOME/usr
make
make install

Now i edited $HOME/usr/etc/libvirt/libvirtd.conf
to set unix_sock_dir = "/var/run/libvirt"

And running sudo ./usr/sbin/libvirtd creates the socket at the desired location.
And so does sudo ./usr/sbin/virtlogd.

But somehow, if i connect to qemu:///system with virt-manager, and attempt
to start a VM, it complains that it cannot find virtlogd socket:

$ sudo strace -e network ./usr/sbin/libvirtd -v
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110)
= -1 ENOENT (No such file or directory)
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110)
= -1 ENOENT (No such file or directory)
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 8
connect(8, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110)
= -1 ENOENT (No such file or directory)
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 8
connect(8, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110)
= -1 ENOENT (No such file or directory)
socket(PF_LOCAL, SOCK_STREAM, 0)        = 8
bind(8, {sa_family=AF_LOCAL, sun_path="/var/run/libvirt/libvirt-sock"}, 110) = 0
listen(8, 1000)                         = 0
socket(PF_LOCAL, SOCK_STREAM, 0)        = 9
bind(9, {sa_family=AF_LOCAL,
sun_path="/var/run/libvirt/libvirt-sock-ro"}, 110) = 0
listen(9, 1000)                         = 0
socket(PF_LOCAL, SOCK_STREAM, 0)        = 10
bind(10, {sa_family=AF_LOCAL,
sun_path="/var/run/libvirt/libvirt-admin-sock"}, 110) = 0
listen(10, 20)                          = 0
socket(PF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_ROUTE) = 11
setsockopt(11, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0
setsockopt(11, SOL_SOCKET, SO_RCVBUF, [32768], 4) = 0
bind(11, {sa_family=AF_NETLINK, pid=1363174407, groups=00000000}, 12) = 0
getsockname(11, {sa_family=AF_NETLINK, pid=1363174407,
groups=00000000}, [12]) = 0
setsockopt(11, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0
setsockopt(11, SOL_SOCKET, SO_RCVBUF, [131702], 4) = 0
socket(PF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_KOBJECT_UEVENT) = 13
setsockopt(13, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0
setsockopt(13, SOL_SOCKET, SO_RCVBUF, [32768], 4) = 0
bind(13, {sa_family=AF_NETLINK, pid=1946182663, groups=00000000}, 12) = 0
getsockname(13, {sa_family=AF_NETLINK, pid=1946182663,
groups=00000000}, [12]) = 0
setsockopt(13, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0
setsockopt(13, SOL_SOCKET, SO_RCVBUF, [131702], 4) = 0
setsockopt(13, SOL_NETLINK, 1, [1], 4)  = 0
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
2018-05-04 00:03:33.794+0000: 25623: info : libvirt version: 3.0.0
2018-05-04 00:03:33.794+0000: 25623: info : hostname: tarrma-Latitude-E7440
2018-05-04 00:03:33.794+0000: 25623: warning :
virSecurityManagerNew:190 : Configured security driver "none" disables
default policy to create confined guests
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
recvmsg(12, 0x7ffcfa7d64e0, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource
temporarily unavailable)
2018-05-04 00:03:33.982+0000: 25623: error :
virQEMUCapsNewForBinaryInternal:4655 : Cannot check QEMU binary
/usr/bin/kvm-spice: No such file or directory
2018-05-04 00:03:33.987+0000: 25623: error :
virQEMUCapsNewForBinaryInternal:4655 : Cannot check QEMU binary
/usr/local/bin/qemu-system-x86_64: No such file or directory
2018-05-04 00:03:34.016+0000: 25623: error :
virQEMUCapsNewForBinaryInternal:4655 : Cannot check QEMU binary
/usr/bin/kvm-spice: No such file or directory
2018-05-04 00:03:34.093+0000: 25623: warning :
virSecurityManagerNew:190 : Configured security driver "none" disables
default policy to create confined guests
accept(8, {sa_family=AF_LOCAL, NULL}, [2]) = 17
getsockname(17, {sa_family=AF_LOCAL,
sun_path="/var/run/libvirt/libvirt-sock"}, [32]) = 0
2018-05-04 00:03:54.887+0000: 25608: error :
virNetSocketNewConnectUNIX:713 : Failed to connect socket to
'/home/tarrma/usr/var/run/libvirt/virtlogd-sock': Connection refused
2018-05-04 00:03:54.888+0000: 25608: error :
virNetSocketNewConnectUNIX:713 : Failed to connect socket to
'/home/tarrma/usr/var/run/libvirt/virtlogd-sock': Connection refused


I hope that helps !

Thanks.

-- 
Mathieu Tarral




More information about the libvir-list mailing list