]> xenbits.xensource.com Git - xen.git/commitdiff
Don't set memory_dynamic_max when xm mem-set is called. Save the VM
authorEwan Mellor <ewan@xensource.com>
Mon, 26 Mar 2007 13:09:36 +0000 (14:09 +0100)
committerEwan Mellor <ewan@xensource.com>
Mon, 26 Mar 2007 13:09:36 +0000 (14:09 +0100)
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>
tools/python/xen/xend/XendDomainInfo.py

index 091d2241c99681a05cef6b367e594381bf2ae599..c783b171a5450f12feccf820a4eae3bc0ea6ea17 100644 (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):