driver/qemu: Actually use the requred Memory from the Task

This commit is contained in:
Clint Shryock
2015-09-09 14:30:35 -05:00
parent db5b3e7e12
commit 966ac0e617

View File

@@ -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",