From eb0653172691b2061d662905e8763571d5d19e5f Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Mon, 9 Mar 2015 08:22:12 +0100 Subject: [PATCH] always setup balloon polling interval. we always need to enable pooling interval, because it doesn't seem to be setup with -machine option Signed-off-by: Alexandre Derumier --- PVE/QemuServer.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 3d962eb9..00cff672 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -4197,10 +4197,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) { @@ -4209,6 +4205,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}); + }); }