mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-06-15 19:59:36 +00:00
Add delay in startall to reduce load at boot time
This commit is contained in:
parent
9b4ea96225
commit
9db78b5ee6
4
qm
4
qm
@ -231,9 +231,13 @@ __PACKAGE__->register_method ({
|
||||
my $vzlist = PVE::QemuServer::vzlist();
|
||||
my $storecfg = PVE::Storage::config();
|
||||
|
||||
my $count = 0;
|
||||
foreach my $vmid (keys %$vzlist) {
|
||||
next if $vzlist->{$vmid}->{pid}; # already running
|
||||
|
||||
sleep(2) if $count != 0; # reduce load
|
||||
$count++;
|
||||
|
||||
eval {
|
||||
my $conf = PVE::QemuServer::load_config($vmid);
|
||||
if ($conf->{onboot}) {
|
||||
|
Loading…
Reference in New Issue
Block a user