[pve-devel] [PATCH] balloon : reset pooling if balloon driver doesn't return memory stats
Alexandre Derumier
aderumier at odiso.com
Wed Dec 19 16:52:55 CET 2012
fix windows stats (tested on win2003 && win2008R2)
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/QemuServer.pm | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 81a9351..7569d55 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2057,6 +2057,19 @@ sub vmstatus {
$d->{freemem} = $info->{free_mem};
}
+ if (defined($info->{last_update}) && !defined($info->{free_mem})){
+ $qmpclient->queue_cmd($vmid, undef, 'qom-set',
+ path => "machine/peripheral/balloon0",
+ property => "stats-polling-interval",
+ value => 0);
+
+ $qmpclient->queue_cmd($vmid, undef, 'qom-set',
+ path => "machine/peripheral/balloon0",
+ property => "stats-polling-interval",
+ value => 2);
+ }
+
+
};
my $blockstatscb = sub {
--
1.7.10.4
More information about the pve-devel
mailing list