[pve-devel] [PATCH] don't send qmp balloon commands if vm is started with a state file

Alexandre Derumier aderumier at odiso.com
Mon Apr 29 14:13:57 CEST 2013


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 f478892..1e2a97e 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3008,7 +3008,7 @@ sub vm_start {
 	}
 	else{
 
-	    if (!defined($conf->{balloon}) || $conf->{balloon}) {
+	    if (!$statefile && (!defined($conf->{balloon}) || $conf->{balloon})) {
 		vm_mon_cmd_nocheck($vmid, "balloon", value => $conf->{balloon}*1024*1024) 
 		    if $conf->{balloon};
 		vm_mon_cmd_nocheck($vmid, 'qom-set', 
-- 
1.7.10.4




More information about the pve-devel mailing list