qubes/vm: fix memory constraint while generating libvirt XML

This commit is contained in:
Wojtek Porczyk 2015-10-02 12:26:06 +02:00
parent c538d536c8
commit 8628a984fc

View File

@ -362,7 +362,7 @@ class BaseVM(qubes.PropertyHolder):
for dev in self.devices['pci'])
args['maxmem'] = str(self.maxmem)
args['vcpus'] = str(self.vcpus)
args['mem'] = str(max(self.memory, self.maxmem))
args['mem'] = str(min(self.memory, self.maxmem))
if 'meminfo-writer' in self.services \
and not self.services['meminfo-writer']: