mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-07 08:58:16 +00:00
Revert "balloon: use qom-get for guest balloon statistics V5"
This reverts commit 0ea19b9cf7
.
This commit is contained in:
parent
130236ffd1
commit
38babf816c
@ -2490,12 +2490,17 @@ sub vmstatus {
|
|||||||
my ($vmid, $resp) = @_;
|
my ($vmid, $resp) = @_;
|
||||||
|
|
||||||
my $info = $resp->{'return'};
|
my $info = $resp->{'return'};
|
||||||
|
return if !$info->{max_mem};
|
||||||
|
|
||||||
my $d = $res->{$vmid};
|
my $d = $res->{$vmid};
|
||||||
|
|
||||||
if (defined($info->{stats}->{"stat-total-memory"}) && defined($info->{stats}->{"stat-free-memory"})) {
|
# use memory assigned to VM
|
||||||
$d->{balloon} = int($info->{stats}->{"stat-total-memory"}/1024/1024);
|
$d->{maxmem} = $info->{max_mem};
|
||||||
$d->{freemem} = int($info->{stats}->{"stat-free-memory"}/1024/1024);
|
$d->{balloon} = $info->{actual};
|
||||||
$d->{mem} = $d->{maxmem} - $d->{freemem};
|
|
||||||
|
if (defined($info->{total_mem}) && defined($info->{free_mem})) {
|
||||||
|
$d->{mem} = $info->{total_mem} - $info->{free_mem};
|
||||||
|
$d->{freemem} = $info->{free_mem};
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -2519,13 +2524,7 @@ sub vmstatus {
|
|||||||
$qmpclient->queue_cmd($vmid, $blockstatscb, 'query-blockstats');
|
$qmpclient->queue_cmd($vmid, $blockstatscb, 'query-blockstats');
|
||||||
# this fails if ballon driver is not loaded, so this must be
|
# this fails if ballon driver is not loaded, so this must be
|
||||||
# the last commnand (following command are aborted if this fails).
|
# the last commnand (following command are aborted if this fails).
|
||||||
# maybe is it fixed by
|
$qmpclient->queue_cmd($vmid, $ballooncb, 'query-balloon');
|
||||||
#http://git.qemu.org/?p=qemu.git;a=commit;h=38dbd48b247ebe05bdc6ef52ccdc60cc21274877
|
|
||||||
|
|
||||||
$qmpclient->queue_cmd($vmid, $ballooncb, 'qom-get',
|
|
||||||
path => "machine/peripheral/balloon0",
|
|
||||||
property => "guest-stats");
|
|
||||||
|
|
||||||
|
|
||||||
my $status = 'unknown';
|
my $status = 'unknown';
|
||||||
if (!defined($status = $resp->{'return'}->{status})) {
|
if (!defined($status = $resp->{'return'}->{status})) {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
qemu-server (4.0-2) unstable; urgency=medium
|
qemu-server (4.0-2) unstable; urgency=medium
|
||||||
|
|
||||||
* balloon: use qom-get for guest balloon statistics
|
|
||||||
|
|
||||||
* drive_add: escape \ character
|
* drive_add: escape \ character
|
||||||
|
|
||||||
* bugfix: allow manual balloning if shares = 0
|
* bugfix: allow manual balloning if shares = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user