]> git.proxmox.com Git - qemu-server.git/commitdiff
Add delay in startall to reduce load at boot time
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 7 Sep 2011 07:54:49 +0000 (09:54 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 7 Sep 2011 07:54:49 +0000 (09:54 +0200)
qm

diff --git a/qm b/qm
index d3210f902a4065072cdfa6efac50eced6d697e0d..546e08fa03a51b16bf6f99e0ea492270198182ad 100755 (executable)
--- a/qm
+++ b/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}) {