mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
libxl: get maximum memory of running domain
* src/libxl/libxl_driver.c: fix the libxlDomainGetInfo to return the maximum memory for running domain
This commit is contained in:
parent
9f135031ff
commit
47370d5a0b
@ -1639,6 +1639,7 @@ libxlDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info)
|
||||
if (!virDomainObjIsActive(vm)) {
|
||||
info->cpuTime = 0;
|
||||
info->memory = vm->def->mem.cur_balloon;
|
||||
info->maxMem = vm->def->mem.max_balloon;
|
||||
} else {
|
||||
if (libxl_domain_info(&driver->ctx, &d_info, dom->id) != 0) {
|
||||
libxlError(VIR_ERR_INTERNAL_ERROR,
|
||||
@ -1647,10 +1648,10 @@ libxlDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info)
|
||||
}
|
||||
info->cpuTime = d_info.cpu_time;
|
||||
info->memory = d_info.current_memkb;
|
||||
info->maxMem = d_info.max_memkb;
|
||||
}
|
||||
|
||||
info->state = virDomainObjGetState(vm, NULL);
|
||||
info->maxMem = vm->def->mem.max_balloon;
|
||||
info->nrVirtCpu = vm->def->vcpus;
|
||||
ret = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user