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: Guido Trotter <[email protected]> --- lib/hypervisor/hv_xen.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/hypervisor/hv_xen.py b/lib/hypervisor/hv_xen.py index 44a761c..22cb4c7 100644 --- a/lib/hypervisor/hv_xen.py +++ b/lib/hypervisor/hv_xen.py @@ -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: -- 1.7.7.3
