提交 47370d5a 编写于 作者: M Markus Groß 提交者: Daniel Veillard

libxl: get maximum memory of running domain

* src/libxl/libxl_driver.c: fix the libxlDomainGetInfo to return the
  maximum memory for running domain
上级 9f135031
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册