skip ha managed VMs in startall

Instead thos VMs should be started by rgmanager.
This commit is contained in:
Dietmar Maurer 2012-03-27 10:41:47 +02:00
parent 88fc87b467
commit 3a2232b3db

5
qm
View File

@ -244,6 +244,8 @@ __PACKAGE__->register_method ({
my $vzlist = PVE::QemuServer::vzlist();
my $storecfg = PVE::Storage::config();
my $cc = PVE::Cluster::cfs_read_file('cluster.conf');
my $count = 0;
foreach my $vmid (keys %$vzlist) {
next if $vzlist->{$vmid}->{pid}; # already running
@ -257,6 +259,9 @@ __PACKAGE__->register_method ({
next if !($conf && $conf->{onboot});
# skip ha managed VMs (started by rgmanager)
next if PVE::Cluster::cluster_conf_lookup_pvevm($cc, 0, $vmid, 1);
sleep(2) if $count != 0; # reduce load
$count++;