mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-09 01:04:59 +00:00
setmaxmem: remove the code to invoke virDomainSetMemory in cmdSetmaxmem
When the new maximum memory size becomes less than the current memory size, I think it is not the libvirt client but the each driver that decides the behavior (reject the operation or shrink the current memory size). Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
This commit is contained in:
parent
8ae5df5d93
commit
74891d9488
@ -3046,16 +3046,8 @@ cmdSetmaxmem(vshControl *ctl, const vshCmd *cmd)
|
||||
|
||||
if (virDomainSetMaxMemory(dom, kilobytes) != 0) {
|
||||
vshError(ctl, "%s", _("Unable to change MaxMemorySize"));
|
||||
virDomainFree(dom);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (kilobytes < info.memory) {
|
||||
if (virDomainSetMemory(dom, kilobytes) != 0) {
|
||||
vshError(ctl, "%s", _("Unable to shrink current MemorySize"));
|
||||
ret = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
virDomainFree(dom);
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user