提交 de03b1dd 编写于 作者: P Peter Krempa

conf: Fix up balloon size after removing a memory device from def

To avoid having the ballooned memory size larger than the actual
physical memory size, truncate the ballooned size if it overflows.
上级 fccc2c33
......@@ -12988,6 +12988,11 @@ virDomainMemoryRemove(virDomainDefPtr def,
{
virDomainMemoryDefPtr ret = def->mems[idx];
VIR_DELETE_ELEMENT(def->mems, idx, def->nmems);
/* fix up balloon size */
if (def->mem.cur_balloon > virDomainDefGetMemoryActual(def))
def->mem.cur_balloon = virDomainDefGetMemoryActual(def);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册