I'm trying to use Xen with virt-manager on Gentoo system and I have some troubles with libvirt daemon. When it starts:

Starting libvirtd ...

/usr/sbin/libvirtd: error: Unable to initialize network sockets. Check /var/log/messages or run without --daemon for more info.

start-stop-daemon: failed to start `/usr/sbin/libvirtd' [ !! ]

ERROR: libvirtd failed to start

But file '/var/log/messages' doesn't exists!

Libvirtd config file (/etc/libvirt/libvirtd.conf):

listen_tls = 0

listen_tcp = 1

unix_sock_group = "libvirt"

unix_sock_ro_perm = "0777"

unix_sock_rw_perm = "0770"

log_level = 3

log_filters = "3:remote 4:event"

log_outputs = "3:syslog:libvirtd"

Can anybody help me, what i'm doing wrong?)

UPD:

I'm so inattentive that I forgot install syslog-ng) I found in logs that daemon didn't start because there was no group with name libvirt - after this group was created libvirtd is ok

closed as off-topic by roaima, cuonglm, G-Man, jimmij, Michael Homer Jul 26 '15 at 8:17

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – roaima, cuonglm, G-Man, jimmij, Michael Homer
If this question can be reworded to fit the rules in the help center, please edit the question.

  • You might get the message that /var/log/messages because you lack the rights to view it. Are you using sudo to view? – pullsumo Jun 19 '13 at 21:48
  • Did you try running libvirtd without the --daemon switch? – slm Jun 20 '13 at 1:49
  • If you solved your problem, please answer this question (and accept it if you want) rather than editing the answer into your question. – casey May 8 '15 at 19:47

First off try doing the following:

$ sudo more /var/log/messages

According to the official documentation over here on libvirt.org: The daemon cannot be started, it states the following changes to /etc/libvirt/libvirtd.conf will turn up the logging level to 3:

/etc/libvirt/libvirtd.conf:

# You need to uncomment this line
log_outputs="3:syslog:libvirtd"

... which should show you more information. With the higher level of debugging turned up, and the ability to see /var/log/messages, if you see messages similar to these:

Feb  6 17:22:09 bart libvirtd: 17576: info : libvirt version: 0.9.9
Feb  6 17:22:09 bart libvirtd: 17576: error : virNetTLSContextCheckCertFile:92: Cannot read CA certificate '/etc/pki/CA/cacert.pem': No such file or directory
Feb  6 17:22:09 bart /etc/init.d/libvirtd[17573]: start-stop-daemon: failed to start `/usr/sbin/libvirtd'
Feb  6 17:22:09 bart /etc/init.d/libvirtd[17565]: ERROR: libvirtd failed to start

Then you need to do the following to fix it:

  1. Install CA certificate
  2. Don't use TLS but bare TCP instead. In /etc/libvirt/libvirtd.conf set listen_tls = 0 and listen_tcp = 1.
  3. Don't pass --listen. In /etc/sysconfig/libvirtd change LIBVIRTD_ARGS variable.

For step #1, the CA certificates were part of the openssl package on my Fedora system. I'd guess they were there too on Genoo as well but they might be in some other package.

Your libvirtd.conf already has #2 taken care of. For #3 I don't believe the path /etc/sysconfig/libvirtd is correct for Gentoo, so I'm not sure where the variable LIBVIRTD_ARGS would be getting set if anywhere on Gentoo. You might want to grep through your /etc directory looking for that variable name and the string --listen.

Not the answer you're looking for? Browse other questions tagged or ask your own question.