[pve-devel] [PATCH] bugfix : allow manual balloning if shares = 0

Alexandre Derumier aderumier at odiso.com
Mon Mar 2 16:03:22 CET 2015


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 8769cb8..a3d8912 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3866,7 +3866,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);
 		}
-- 
1.7.10.4




More information about the pve-devel mailing list