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

Benoit benoitne at gmail.com
Thu Aug 11 18:41:38 UTC 2016


Thanks Andrea,

Yes I confirm to you that I have enabled libvirt as well.

I don't see any error right now but I have to investigate a little bit more.

My guests are in autostart in virsh so everything is fine on this, the 
only issue I got is in case of shutdown.

The strange thing is that sometimes libvirt-guests is up and running 
sometimes failed...

just for info this is my libvirt-guests.service (by default)

[Unit]
Description=Suspend Active Libvirt Guests
After=network.target libvirtd.service time-sync.target
Documentation=man:libvirtd(8)
Documentation=http://libvirt.org

[Service]
EnvironmentFile=-/etc/conf.d/libvirt-guests
# Hack just call traditional service until we factor
# out the code
ExecStart=/usr/lib/libvirt/libvirt-guests.sh start
ExecStop=/usr/lib/libvirt/libvirt-guests.sh stop
Type=oneshot
RemainAfterExit=yes
StandardOutput=journal+console
TimeoutStopSec=0

[Install]
WantedBy=multi-user.target


On 08/11/2016 06:36 PM, Andrea Bolognani wrote:
> 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?




More information about the libvirt-users mailing list