[pve-devel] [PATCH 2/2] always setup balloon polling interval.

Alexandre Derumier aderumier at odiso.com
Mon Mar 9 08:22:12 CET 2015


we always need to enable pooling interval, because it doesn't seem to be setup with -machine option

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index bb7a7f3..83c1df5 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -4196,10 +4196,6 @@ sub vm_start {
 	    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',
-			    path => "machine/peripheral/balloon0",
-			    property => "guest-stats-polling-interval",
-			    value => 2);
 	    }
 
 	    foreach my $opt (keys %$conf) {
@@ -4208,6 +4204,12 @@ sub vm_start {
 		qemu_set_link_status($vmid, $opt, 0) if $nicconf->{link_down};
 	    }
 	}
+	
+	vm_mon_cmd_nocheck($vmid, 'qom-set',
+		    path => "machine/peripheral/balloon0",
+		    property => "guest-stats-polling-interval",
+		    value => 2) if (!defined($conf->{balloon}) || $conf->{balloon});
+
     });
 }
 
-- 
1.7.10.4




More information about the pve-devel mailing list