From 966ac0e61716a74aa1c1f7458564c4f0ce59cea4 Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Wed, 9 Sep 2015 14:30:35 -0500 Subject: [PATCH] driver/qemu: Actually use the requred Memory from the Task --- client/driver/qemu.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/driver/qemu.go b/client/driver/qemu.go index 66fc05425..3e16320fe 100644 --- a/client/driver/qemu.go +++ b/client/driver/qemu.go @@ -135,13 +135,11 @@ func (d *QemuDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle, // Parse configuration arguments // Create the base arguments accelerator := "tcg" - mem := "512M" if acc, ok := task.Config["accelerator"]; ok { accelerator = acc } - if m, ok := task.Config["memory"]; ok { - mem = m - } + // TODO: Check a lower bounds, e.g. the default 128 of Qemu + mem := fmt.Sprintf("%dM", task.Resources.MemoryMB) args := []string{ "qemu-system-x86_64",