libvirt autostart and libvirt-guests power management
It is important to understand the difference and cooperation between the two
options. Especially when mixing those two options.
When the option ON_BOOT from libvirt-guests is set to start all VMs, which
were running before shutdown are started again. The option START_DELAY adds
waiting periods between each start of a guest. The booting of this machines is
managed by libvirt-guests.
Machines marked as autostart for libvirtd (e. g. with virsh autostart --domain) will be started at boot of the host. Regardless of the state the VM
had before shutdown. This behavior takes precedence over the management from
libvirt-guests. That means that for all VMs, which are marked as autostart will
start right ahead with the host, completely ignoring options like START_DELAY
from libvirt-guests.
But what does work when using both mechanisms are the options for shutdown from
libvirt-guests, e. g. ON_SHUTDOWN. This is because the libvirtd does not
interfere in here.
To summarize the management of those tools:
libvirtd autostart: Ensures the defined state of running VMs at boot.
libvirt-guests: Does restore the state before power cycling the VMs.