[libvirt-users] systemctl libvirt-guests.service fails to start during host boot

Andrea Bolognani abologna at redhat.com
Thu Aug 11 16:36:41 UTC 2016


On Thu, 2016-08-11 at 11:22 +0200, Benoit wrote:
> Hi, 
> I have been using qemu and kvm for a while but I am newbie to libvirt. (but I really like it :)
> I am on Parabola (fork of Archlinux, using systemd)
> I only got an issue regarding libvirt-guests service, when my host boots about 7 times to 10 I got a issue on the service.
> systemctl status libvirt-guests.service
> ● libvirt-guests.service - Suspend Active Libvirt Guests
>    Loaded: loaded (/usr/lib/systemd/system/libvirt-guests.service; enabled; vendor preset: disabled)
>    Active: failed (Result: exit-code) since Thu 2016-08-11 10:55:35 CEST; 36s ago
>      Docs: man:libvirtd(8)
>            http://libvirt.org
>   Process: 347 ExecStart=/usr/lib/libvirt/libvirt-guests.sh start (code=exited, status=1/FAILURE)
>  Main PID: 347 (code=exited, status=1/FAILURE)
> 
> Aug 11 10:55:35 oms_apex_plaisir systemd[1]: Starting Suspend Active Libvirt Guests...
> Aug 11 10:55:35 oms_apex_plaisir libvirt-guests.sh[347]: Resuming guests on default URI...
> Aug 11 10:55:35 oms_apex_plaisir libvirt-guests.sh[347]: Resuming guest : error: failed to connect to the hypervisor
> Aug 11 10:55:35 oms_apex_plaisir libvirt-guests.sh[347]: error: no valid connection
> Aug 11 10:55:35 oms_apex_plaisir libvirt-guests.sh[347]: error: Failed to connect socket to '/var/run/libvirt/libvirt-sock' no such file
> Aug 11 10:55:35 oms_apex_plaisir systemd[1]: libvirt-guests.service: Main process exited, code=exited, status=1/FAILURE
> Aug 11 10:55:35 oms_apex_plaisir systemd[1]: Failed to start Suspend Active Libvirt Guests.
> Aug 11 10:55:35 oms_apex_plaisir systemd[1]: libvirt-guests.service: Unit entered failed state.
> Aug 11 10:55:35 oms_apex_plaisir systemd[1]: libvirt-guests.service: Failed with result 'exit-code'.
> it is like the service starts too early.
> When I restart the service everything is good and if I shutdown it sends the ACPI message correctly to my guests.
> 
> I already seen lot of discussion but not able to find any working solution.. any idea to help me figure out the issue ? 
> many thanks

That's very weird. Apparently, libvirtd is not running by the
time libvirt-guests is started, despite the fact that the
unit file for the former contains

  Before=libvirt-guests.service

and the one for the latter contains

  After=libvirtd.service

That should be more than enough to ensure the proper ordering
is followed when starting / stopping the services.

Is the libvirtd service enabled at all? Are there any startup
errors / warnings? Does the libvirt-guests service actually
bring up the guests that were running before shutdown when
you start it a second time?

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvirt-users mailing list