Commit f5a4b9ce authored by Guido Trotter's avatar Guido Trotter
Browse files

hypervisors: use maximum memory for all operations


Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 1db993d5
......@@ -133,7 +133,7 @@ class FakeHypervisor(hv_base.BaseHypervisor):
fh = file(file_name, "w")
try:
fh.write("0\n%d\n%d\n" %
(instance.beparams[constants.BE_MEMORY],
(instance.beparams[constants.BE_MAXMEM],
instance.beparams[constants.BE_VCPUS]))
finally:
fh.close()
......
......@@ -923,7 +923,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
kvm_cmd = [kvm]
# used just by the vnc server, if enabled
kvm_cmd.extend(["-name", instance.name])
kvm_cmd.extend(["-m", instance.beparams[constants.BE_MEMORY]])
kvm_cmd.extend(["-m", instance.beparams[constants.BE_MAXMEM]])
kvm_cmd.extend(["-smp", instance.beparams[constants.BE_VCPUS]])
kvm_cmd.extend(["-pidfile", pidfile])
kvm_cmd.extend(["-daemonize"])
......
......@@ -608,7 +608,7 @@ class XenPvmHypervisor(XenHypervisor):
config.write("ramdisk = '%s'\n" % initrd_path)
# rest of the settings
config.write("memory = %d\n" % instance.beparams[constants.BE_MEMORY])
config.write("memory = %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:
......@@ -707,7 +707,7 @@ class XenHvmHypervisor(XenHypervisor):
config.write("kernel = '%s'\n" % kpath)
config.write("builder = 'hvm'\n")
config.write("memory = %d\n" % instance.beparams[constants.BE_MEMORY])
config.write("memory = %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