Inception Hosting
2018-Aug-22 12:43 UTC
[libvirt-users] Guest startup delay options ignored
Hi Folks, been searching around for a while on this and see similar issues reported going back a number of years without solution. The START_DELAY=(number) seems to be completely ignored in /etc/sysconfig/libvirt-guests which is unfortunate as it means everything starts at once without control. This is fine on NVMe based servers however on the older spinning disks the I/O is creating significant issues. Is anyone aware of any other methods to achieve a start up delay for guest virtual machines on boot? Thanks. Anthony.
Inception Hosting
2018-Aug-23 12:13 UTC
Re: [libvirt-users] Guest startup delay options ignored
just a followup with more information: The approach I have tried is to update /etc/sysconfig/libvirt-guests as follows: # URIs to check for running guests # example: URIS='default xen:/// vbox+tcp://host/system lxc:///' #URIS=default # action taken on host boot # - start all guests which were running on shutdown are started on boot # regardless on their autostart settings # - ignore libvirt-guests init script won't start any guest on boot, however, # guests marked as autostart will still be automatically started by # libvirtd ON_BOOT=ignore # Number of seconds to wait between each guest start. Set to 0 to allow # parallel startup. START_DELAY=180 # action taken on host shutdown # - suspend all running guests are suspended using virsh managedsave # - shutdown all running guests are asked to shutdown. Please be careful with # this settings since there is no way to distinguish between a # guest which is stuck or ignores shutdown requests and a guest # which just needs a long time to shutdown. When setting # ON_SHUTDOWN=shutdown, you must also set SHUTDOWN_TIMEOUT to a # value suitable for your guests. ON_SHUTDOWN=shutdown # If set to non-zero, shutdown will suspend guests concurrently. Number of # guests on shutdown at any time will not exceed number set in this variable. #PARALLEL_SHUTDOWN=0 # Number of seconds we're willing to wait for a guest to shut down. If parallel # shutdown is enabled, this timeout applies as a timeout for shutting down all # guests on a single URI defined in the variable URIS. If this is 0, then there # is no time out (use with caution, as guests might not respond to a shutdown # request). The default value is 300 seconds (5 minutes). #SHUTDOWN_TIMEOUT=300 # If non-zero, try to bypass the file system cache when saving and # restoring guests, even though this may give slower operation for # some file systems. #BYPASS_CACHE=0 I have verified the default URIs path in libvirt.conf is correct also and have tried changing the default in the above config file to qemu:///system & qemu:/// All the guests boot at the same time regardless of changes made. I have also tried removing the contents of /etc/libvirt/qemu/autostart/ incase the symbolic links were overriding the libvirt-guests config however nothing starts then (not surprising). ________________________________ From: libvirt-users-bounces@redhat.com <libvirt-users-bounces@redhat.com> on behalf of Inception Hosting <inbox@inceptionhosting.com> Sent: 22 August 2018 13:43:07 To: libvirt-users@redhat.com Subject: [libvirt-users] Guest startup delay options ignored Hi Folks, been searching around for a while on this and see similar issues reported going back a number of years without solution. The START_DELAY=(number) seems to be completely ignored in /etc/sysconfig/libvirt-guests which is unfortunate as it means everything starts at once without control. This is fine on NVMe based servers however on the older spinning disks the I/O is creating significant issues. Is anyone aware of any other methods to achieve a start up delay for guest virtual machines on boot? Thanks. Anthony.
Andrea Bolognani
2018-Aug-23 14:03 UTC
Re: [libvirt-users] Guest startup delay options ignored
On Thu, 2018-08-23 at 12:13 +0000, Inception Hosting wrote:> just a followup with more information:Please don't top post on technical mailing lists.> The approach I have tried is to update /etc/sysconfig/libvirt-guests as follows:[...]> # action taken on host boot > # - start all guests which were running on shutdown are started on boot > # regardless on their autostart settings > # - ignore libvirt-guests init script won't start any guest on boot, however, > # guests marked as autostart will still be automatically started by > # libvirtd > ON_BOOT=ignoreAs explained in the comment above it, this setting tells the libvirt-guests script not to start guests during boot, so I'm not very surprised further settings...> # Number of seconds to wait between each guest start. Set to 0 to allow > # parallel startup. > START_DELAY=180... like this one are not being honored :) [...]> I have verified the default URIs path in libvirt.conf is correct also > and have tried changing the default in the above config file to > qemu:///system & qemu:/// > > All the guests boot at the same time regardless of changes made. > > I have also tried removing the contents of > /etc/libvirt/qemu/autostart/ incase the symbolic links were overriding > the libvirt-guests config however nothing starts then (not > surprising).You shouldn't poke at the filesystem behind libvirt's back: please use 'virsh autostart' instead. Basically in your current setup guests are not started at boot by the libvirt-guests script but by libvirtd itself; the former supports adding a delay between starting a guests and starting the next one, but the latter AFAIK doesn't. To be honest, the libvirt-guests script and particularly its interaction with libvirtd's own autostart feature are kind of a mess, one that is not well documented and that I don't think we can fix without breaking backwards compatibility. In particular, what you are trying to achieve is simply not possible without implementing your own scripts, at least to the best of my knowledge. Hopefully someone will prove me wrong, but I really wouldn't count too much on it :( -- Andrea Bolognani / Red Hat / Virtualization