[SOLVED] How to use startall-onboot-delay

Elliott Partridge

Well-Known Member
Oct 7, 2018
57
11
48
Pittsburgh, PA
I was trying to figure out how to delay the startup of VMs & containers and happened upon this little script (used by the pve-guests.service):
Code:
/usr/share/pve-manager/helpers/pve-startall-delay
#!/usr/bin/perl

use strict;
use warnings;

use PVE::INotify;
use PVE::NodeConfig;

my $local_node = PVE::INotify::nodename();

my $node_config = eval { PVE::NodeConfig::load_config($local_node) } // {};

if (my $delay = $node_config->{'startall-onboot-delay'}) {
    warn "Delaying on-boot 'startall' command for $delay second(s).\n";
    sleep($delay); # don't care for interrupts, best effort only
}

exit 0;

It looks like the startall-onboot-delay parameter is what I want to set. How do I do this? Is it set directly in /etc/pve/nodes/<node>/config? I don't see a GUI option anywhere for this yet.

I'm on pve-manager/6.4-13/9f411e79.