Don't set memory_dynamic_max when xm mem-set is called. Save the VM

configuration unconditionally when either the max or the target memory values
are set.

Thanks to Masaki Kanno for pointing out the first problem.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
Ewan Mellor committed 2007-03-26 14:09:36 +01:00
1 parent c322cc7717
commit c24f98944d
1 file changed
+2 -5
+2 -5
View File
@@ -586,8 +586,7 @@ class XendDomainInfo:
if self.domid >= 0:
self.storeVm("memory", target)
self.storeDom("memory/target", target << 10)
else:
xen.xend.XendDomain.instance().managed_config_save(self)
xen.xend.XendDomain.instance().managed_config_save(self)
def setMemoryMaximum(self, limit):
"""Set the maximum memory limit of this domain
@@ -608,9 +607,7 @@ class XendDomainInfo:
return xc.domain_setmaxmem(self.domid, maxmem)
except Exception, ex:
raise XendError(str(ex))
else:
self.info['memory_dynamic_max'] = limit * MiB
xen.xend.XendDomain.instance().managed_config_save(self)
xen.xend.XendDomain.instance().managed_config_save(self)
def getVCPUInfo(self):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.