You are not logged in.

#1 2015-04-19 17:47:01

fseven
Member
Registered: 2015-04-15
Posts: 16

libvirtd service not starting

Hello,
I'm trying to get systemd to start libvirtd, but I always get "Job for libvirtd.service failed. See "systemctl status libvirtd.service" and "journalctl -xe" for details."
The log is very inconclusive:

libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2015-04-19 19:40:41 CEST; 2min 19s ago
     Docs: man:libvirtd(8)
           http://libvirt.org
  Process: 16064 ExecStart=/usr/bin/libvirtd (code=exited, status=1/FAILURE)
 Main PID: 16064 (code=exited, status=1/FAILURE)

Apr 19 19:40:41 archpc libvirtd[16064]: /usr/bin/libvirtd: initialization failed
Apr 19 19:40:41 archpc systemd[1]: libvirtd.service: main process exited, code=exited, status...LURE
Apr 19 19:40:41 archpc systemd[1]: Failed to start Virtualization daemon.
Apr 19 19:40:41 archpc systemd[1]: Unit libvirtd.service entered failed state.
Apr 19 19:40:41 archpc systemd[1]: libvirtd.service failed.

libvirtd config files are the ones shipped with the official package.
The only things changed are the 2 lines

log_level = 1
log_outputs="1:journald"

(Tried that to get more information.)

When I run libvirtd normally I get no errors.

What can I do to solve this or at least get a less generic error message?

Thanks!

Offline

#2 2015-04-19 18:28:43

PaterSiul
Member
Registered: 2015-04-01
Posts: 18

Re: libvirtd service not starting

try journalctl -b -u libvirtd.service

Offline

#3 2015-04-19 18:37:57

fseven
Member
Registered: 2015-04-15
Posts: 16

Re: libvirtd service not starting

PaterSiul wrote:

try journalctl -b -u libvirtd.service

-- Logs begin at Fri 2015-04-17 01:22:19 CEST, end at Sun 2015-04-19 20:36:21 CEST. --
Apr 19 20:11:41 archpc libvirtd[440]: /usr/bin/libvirtd: initialization failed
Apr 19 20:11:41 archpc systemd[1]: libvirtd.service: main process exited, code=exited, status=1/FAILURE
Apr 19 20:11:41 archpc systemd[1]: Failed to start Virtualization daemon.
Apr 19 20:11:41 archpc systemd[1]: Unit libvirtd.service entered failed state.
Apr 19 20:11:41 archpc systemd[1]: libvirtd.service failed.
Apr 19 20:11:41 archpc libvirtd[496]: /usr/bin/libvirtd: initialization failed
Apr 19 20:11:41 archpc systemd[1]: libvirtd.service: main process exited, code=exited, status=1/FAILURE
Apr 19 20:11:41 archpc systemd[1]: Failed to start Virtualization daemon.
Apr 19 20:11:41 archpc systemd[1]: Unit libvirtd.service entered failed state.
Apr 19 20:11:41 archpc systemd[1]: libvirtd.service failed.
Apr 19 20:11:41 archpc libvirtd[505]: /usr/bin/libvirtd: initialization failed
Apr 19 20:11:41 archpc systemd[1]: libvirtd.service: main process exited, code=exited, status=1/FAILURE
Apr 19 20:11:41 archpc systemd[1]: Failed to start Virtualization daemon.
Apr 19 20:11:41 archpc systemd[1]: Unit libvirtd.service entered failed state.
Apr 19 20:11:41 archpc systemd[1]: libvirtd.service failed.
Apr 19 20:11:42 archpc libvirtd[507]: /usr/bin/libvirtd: initialization failed
Apr 19 20:11:42 archpc systemd[1]: libvirtd.service: main process exited, code=exited, status=1/FAILURE
Apr 19 20:11:42 archpc systemd[1]: Failed to start Virtualization daemon.
Apr 19 20:11:42 archpc systemd[1]: Unit libvirtd.service entered failed state.
Apr 19 20:11:42 archpc systemd[1]: libvirtd.service failed.
Apr 19 20:11:42 archpc libvirtd[509]: /usr/bin/libvirtd: initialization failed
Apr 19 20:11:42 archpc systemd[1]: libvirtd.service: main process exited, code=exited, status=1/FAILURE
Apr 19 20:11:42 archpc systemd[1]: Failed to start Virtualization daemon.
Apr 19 20:11:42 archpc systemd[1]: Unit libvirtd.service entered failed state.
Apr 19 20:11:42 archpc systemd[1]: libvirtd.service failed.
Apr 19 20:11:42 archpc systemd[1]: start request repeated too quickly for libvirtd.service
Apr 19 20:11:42 archpc systemd[1]: Failed to start Virtualization daemon.
Apr 19 20:11:42 archpc systemd[1]: Unit libvirtd.service entered failed state.
Apr 19 20:11:42 archpc systemd[1]: libvirtd.service failed.
Apr 19 20:36:17 archpc libvirtd[2294]: /usr/bin/libvirtd: initialization failed
Apr 19 20:36:17 archpc systemd[1]: libvirtd.service: main process exited, code=exited, status=1/FAILURE
Apr 19 20:36:17 archpc systemd[1]: Failed to start Virtualization daemon.
Apr 19 20:36:17 archpc systemd[1]: Unit libvirtd.service entered failed state.
Apr 19 20:36:17 archpc systemd[1]: libvirtd.service failed.
Apr 19 20:36:17 archpc libvirtd[2329]: /usr/bin/libvirtd: initialization failed
Apr 19 20:36:17 archpc systemd[1]: libvirtd.service: main process exited, code=exited, status=1/FAILURE
Apr 19 20:36:17 archpc systemd[1]: Failed to start Virtualization daemon.
Apr 19 20:36:17 archpc systemd[1]: Unit libvirtd.service entered failed state.
Apr 19 20:36:17 archpc systemd[1]: libvirtd.service failed.
Apr 19 20:36:17 archpc libvirtd[2332]: /usr/bin/libvirtd: initialization failed
Apr 19 20:36:17 archpc systemd[1]: libvirtd.service: main process exited, code=exited, status=1/FAILURE
Apr 19 20:36:17 archpc systemd[1]: Failed to start Virtualization daemon.
Apr 19 20:36:17 archpc systemd[1]: Unit libvirtd.service entered failed state.
Apr 19 20:36:17 archpc systemd[1]: libvirtd.service failed.
Apr 19 20:36:18 archpc libvirtd[2334]: /usr/bin/libvirtd: initialization failed
Apr 19 20:36:18 archpc systemd[1]: libvirtd.service: main process exited, code=exited, status=1/FAILURE
Apr 19 20:36:18 archpc systemd[1]: Failed to start Virtualization daemon.
Apr 19 20:36:18 archpc systemd[1]: Unit libvirtd.service entered failed state.
Apr 19 20:36:18 archpc systemd[1]: libvirtd.service failed.
Apr 19 20:36:18 archpc libvirtd[2336]: /usr/bin/libvirtd: initialization failed
Apr 19 20:36:18 archpc systemd[1]: libvirtd.service: main process exited, code=exited, status=1/FAILURE
Apr 19 20:36:18 archpc systemd[1]: Failed to start Virtualization daemon.
Apr 19 20:36:18 archpc systemd[1]: Unit libvirtd.service entered failed state.
Apr 19 20:36:18 archpc systemd[1]: libvirtd.service failed.
Apr 19 20:36:18 archpc systemd[1]: start request repeated too quickly for libvirtd.service
Apr 19 20:36:18 archpc systemd[1]: Failed to start Virtualization daemon.
Apr 19 20:36:18 archpc systemd[1]: Unit libvirtd.service entered failed state.
Apr 19 20:36:18 archpc systemd[1]: libvirtd.service failed.

Not much there either I'm afraid.

Offline

#4 2015-04-20 14:41:40

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: libvirtd service not starting

You mentioned that running libvirtd manually works but did you do it as root? Because that was what equivalent to the service does.
Also according to the post upgrade message of libvirt, ~/.libvirt (/root/.libvirt) may need to be removed.
You may want to try `pacman -R libvirt; pacman -S libvirt` as well instead of only `pacman -S libvirt` to reinstall. Otherwise the config files in the backup array of the PKGBUILD won't be replaced.

Last edited by tom.ty89 (2015-04-20 14:50:48)

Offline

#5 2015-04-20 19:33:10

fseven
Member
Registered: 2015-04-15
Posts: 16

Re: libvirtd service not starting

tom.ty89 wrote:

You mentioned that running libvirtd manually works but did you do it as root? Because that was what equivalent to the service does.
Also according to the post upgrade message of libvirt, ~/.libvirt (/root/.libvirt) may need to be removed.
You may want to try `pacman -R libvirt; pacman -S libvirt` as well instead of only `pacman -S libvirt` to reinstall. Otherwise the config files in the backup array of the PKGBUILD won't be replaced.

I saw that while updating right now, but I don't have that directory.
And removing / reinstalling like you said has no effect either.
It's really strange that it doesn't log anything (the log options work fine if started normally).

Offline

#6 2015-07-08 18:50:19

kikko
Member
Registered: 2015-07-08
Posts: 2

Re: libvirtd service not starting

Hi
I'm facing the same issue: if libvirtd is started manually, works fine (it also works with virt-manager),otherwise using

systemctl start libvirtd

it always fails and there is nothing in the logs
Here is my (cleaned) libvirtd.conf:

[root@kik-arch ~]# grep -vE "^(#| *$)" /etc/libvirt/libvirtd.conf
listen_tls = 0
listen_tcp = 1
auth_tcp = "none"
log_level = 2
log_outputs="2:journald 3:stderr"

I've tried starting libvirtd using either the root and a "normal" user, it works in both cases
Furthermore, if started as a service by systemd, there is no log in the journal; if started by hand, a lot of libvirtd stuff appears, accordingly to the log level

So... ?????

Offline

#7 2015-07-08 21:10:22

kikko
Member
Registered: 2015-07-08
Posts: 2

Re: libvirtd service not starting

There is something strange in the /usr/lib/systemd/system/libvirtd.service:

[Unit]
Description=Virtualization daemon
Before=libvirt-guests.service
After=network.target
After=dbus.service
After=iscsid.service
After=apparmor.service
Documentation=man:libvirtd(8)
Documentation=http://libvirt.org

[Service]
Type=notify
EnvironmentFile=-/etc/conf.d/libvirtd
ExecStart=/usr/bin/libvirtd $LIBVIRTD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
# Override the maximum number of opened files
#LimitNOFILE=2048

[Install]
WantedBy=multi-user.target

is that dash sign in the EnvironmentFile=-/etc/conf.d/libvirtd statement correct?

Offline

#8 2015-07-09 12:46:34

snakeroot
Member
Registered: 2012-10-06
Posts: 164

Re: libvirtd service not starting

kikko wrote:

is that dash sign in the EnvironmentFile=-/etc/conf.d/libvirtd statement correct?

Yes, it just prevents systemd whinging if /etc/conf.d/libvirtd doesn't exist.

man systemd.exec wrote:

The argument passed [to "EnvironmentFile="] should be an absolute filename or wildcard expression, optionally prefixed with "-", which indicates that if the file does not exist, it will not be read and no error or warning message is logged.

Regards,

Offline

#9 2015-10-09 10:42:47

kingkilla
Member
Registered: 2015-10-08
Posts: 1

Re: libvirtd service not starting

I've also got the same problem, have you by chance found a fix?

Offline

#10 2015-10-15 04:29:43

Fv02N
Member
Registered: 2015-10-15
Posts: 1

Re: libvirtd service not starting

I found that I needed BOTH of the following locales enabled in /etc/locale.gen

en_US.UTF-8 UTF-8 
en_US ISO-8859-1

Then run locale-gen.  With only UTF-8, libvirtd dies silently.

Offline

Board footer

Powered by FluxBB