aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@freebsd.org>2018-11-30 11:19:51 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-11-30 13:12:57 +0000
commitade12e916228d16e9fda8d73d907b4af27f77103 (patch)
tree0a8e61460433ff0cf4395a2cfe505c592194b13b
parent66071e276fc06bc4482a4844c0596ede600d0ba3 (diff)
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.
-rw-r--r--vm/qemu/qemu.go4
1 files changed, 3 insertions, 1 deletions
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",