Add delay in startall to reduce load at boot time

This commit is contained in:
Dietmar Maurer 2011-09-07 09:54:49 +02:00
parent 9b4ea96225
commit 9db78b5ee6

4
qm
View File

@ -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}) {