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 e844d31ac9
commit 202edd63e6

View File

@ -855,6 +855,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