bugfix : allow manual balloning if shares = 0

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2015-03-02 16:03:22 +01:00 committed by Dietmar Maurer
parent 5b584381dd
commit 4cc1efa615

View File

@ -3865,7 +3865,7 @@ sub vmconfig_hotplug_pending {
die "skip\n" if $old_balloon_enabled != $new_balloon_enabled;
# allow manual ballooning if shares is set to zero
if (!(defined($conf->{shares}) && ($conf->{shares} == 0))) {
if ((defined($conf->{shares}) && ($conf->{shares} == 0))) {
my $balloon = $conf->{pending}->{balloon} || $conf->{memory} || $defaults->{memory};
vm_mon_cmd($vmid, "balloon", value => $balloon*1024*1024);
}