From ade12e916228d16e9fda8d73d907b4af27f77103 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Fri, 30 Nov 2018 11:19:51 +0100 Subject: vm/qemu: Allow empty qemu-args. Allow setting qemu_args to "" in the config file. This is needed when running qemu from the qemu-devel package on FreeBSD, which does not support the -enable-kvm option. Without this patch, an entry "" is added to the list of command line parameters, which breaks the starting of the qemu instances. --- vm/qemu/qemu.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vm/qemu/qemu.go b/vm/qemu/qemu.go index 44b9909ce..504405c60 100644 --- a/vm/qemu/qemu.go +++ b/vm/qemu/qemu.go @@ -313,7 +313,9 @@ func (inst *instance) Boot() error { "-serial", "stdio", "-no-reboot", } - args = append(args, strings.Split(inst.cfg.QemuArgs, " ")...) + if inst.cfg.QemuArgs != "" { + args = append(args, strings.Split(inst.cfg.QemuArgs, " ")...) + } if inst.image == "9p" { args = append(args, "-fsdev", "local,id=fsdev0,path=/,security_model=none,readonly", -- cgit mrf-deployment