dom0/qvm-prefs: relax memory check
Allow memory > maxmem, anyway it will be enforced at VM boot. This allows to set memory and maxmem in any order. Also required to increase memory for HVM.
This commit is contained in:
parent
9084548456
commit
ac804b5c2d
@ -106,8 +106,9 @@ def set_memory(vms, vm, args):
|
||||
print >>sys.stderr, "Memory size must be positive"
|
||||
return False
|
||||
|
||||
if new_memory > vm.maxmem:
|
||||
print >>sys.stderr, "Memory size must be less or equal to maxmem"
|
||||
qubes_host = QubesHost()
|
||||
if new_memory > qubes_host.memory_total/1024:
|
||||
print >> sys.stderr, "This host has only {0} MB of RAM".format(qubes_host.memory_total/1024)
|
||||
return False
|
||||
|
||||
vm.memory = new_memory
|
||||
|
Loading…
Reference in New Issue
Block a user