mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 21:15:20 +00:00
Revert "LXC: show used memory as 0 when domain is not active"
This reverts commit 1ce7c1d20cfd5afb26d2dbc88201085d52415d0e, which introduced a significant semantic change to the virDomainGetInfo() API. Additionally, the change was only made to 2 of the 15 virt drivers. Conflicts: src/qemu/qemu_driver.c Signed-off-by: Jim Fehlig <jfehlig@suse.com> (cherry picked from commit 60acb38abbee1636a9cddf8d296f700d115c8f77)
This commit is contained in:
parent
ba2b5b7dbf
commit
c814a546f2
@ -599,7 +599,7 @@ static int lxcDomainGetInfo(virDomainPtr dom,
|
||||
|
||||
if (!virDomainObjIsActive(vm)) {
|
||||
info->cpuTime = 0;
|
||||
info->memory = 0;
|
||||
info->memory = vm->def->mem.cur_balloon;
|
||||
} else {
|
||||
if (virCgroupGetCpuacctUsage(priv->cgroup, &(info->cpuTime)) < 0) {
|
||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
|
@ -2643,7 +2643,7 @@ static int qemuDomainGetInfo(virDomainPtr dom,
|
||||
info->memory = vm->def->mem.cur_balloon;
|
||||
}
|
||||
} else {
|
||||
info->memory = 0;
|
||||
info->memory = vm->def->mem.cur_balloon;
|
||||
}
|
||||
|
||||
info->nrVirtCpu = vm->def->vcpus;
|
||||
|
Loading…
x
Reference in New Issue
Block a user