[SOLVED] How to use startall-onboot-delay

Elliott Partridge

Well-Known Member
Oct 7, 2018
56
11
48
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.
 
Figured it out (easy to test - just run the script!). For a delay of 10 seconds, I added the following line:

Code:
/etc/pve/nodes/<node>/config
startall-onboot-delay: 10
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!