dom0/core: force memory <= maxmem at VM startup (#497)

This commit is contained in:
Marek Marczykowski 2012-04-18 12:31:58 +02:00
parent adec43af85
commit 47b70235e3

View File

@ -846,6 +846,8 @@ class QubesVm(object):
args['vmdir'] = self.dir_path
args['pcidev'] = str(self.pcidevs).strip('[]')
args['mem'] = str(self.memory)
if self.maxmem < self.memory:
args['mem'] = str(self.maxmem)
args['maxmem'] = str(self.maxmem)
if 'meminfo-writer' in self.services and not self.services['meminfo-writer']:
# If dynamic memory management disabled, set maxmem=mem