mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
lxc: fix setmem effect on a running LXC machine
When user calls setmem on a running LXC machine, we do update its cgroup entry, however we neither update domain's runtime XML nor we update our internal structures and this patch fixes it. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1131919
This commit is contained in:
parent
0dba4a4d42
commit
c87f268a36
@ -749,6 +749,10 @@ static int lxcDomainSetMemoryFlags(virDomainPtr dom, unsigned long newmem,
|
||||
"%s", _("Failed to set memory for domain"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
vm->def->mem.cur_balloon = newmem;
|
||||
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user