Commit 80121c83 authored by Guido Trotter's avatar Guido Trotter
Browse files

xen: add the "maxmem" parameter in instances config



This is set to the same amount as the memory for now, but will allow
starting instances with less memory than their maximum.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 3d836750
......@@ -650,7 +650,9 @@ class XenPvmHypervisor(XenHypervisor):
config.write("ramdisk = '%s'\n" % initrd_path)
# rest of the settings
# TODO(dynmem): use actual chosen memory for instance startup
config.write("memory = %d\n" % instance.beparams[constants.BE_MAXMEM])
config.write("maxmem = %d\n" % instance.beparams[constants.BE_MAXMEM])
config.write("vcpus = %d\n" % instance.beparams[constants.BE_VCPUS])
cpu_pinning = cls._CreateConfigCpus(hvp[constants.HV_CPU_MASK])
if cpu_pinning:
......@@ -749,7 +751,9 @@ class XenHvmHypervisor(XenHypervisor):
config.write("kernel = '%s'\n" % kpath)
config.write("builder = 'hvm'\n")
# TODO(dynmem): use actual chosen memory for instance startup
config.write("memory = %d\n" % instance.beparams[constants.BE_MAXMEM])
config.write("maxmem = %d\n" % instance.beparams[constants.BE_MAXMEM])
config.write("vcpus = %d\n" % instance.beparams[constants.BE_VCPUS])
cpu_pinning = cls._CreateConfigCpus(hvp[constants.HV_CPU_MASK])
if cpu_pinning:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment