From b8c13d3e4d72eb0b72d103f079a95fba21571666 Mon Sep 17 00:00:00 2001 From: Matthew Baker Date: Thu, 7 Aug 2014 04:08:50 -0700 Subject: [PATCH] Keeping the -machine type=pc if accelerator method set to "none" --- builder/qemu/step_run.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/builder/qemu/step_run.go b/builder/qemu/step_run.go index 7624ab68f..67be8ae6d 100644 --- a/builder/qemu/step_run.go +++ b/builder/qemu/step_run.go @@ -77,12 +77,14 @@ func getCommandArgs(bootDrive string, state multistep.StateBag) ([]string, error } defaultArgs["-name"] = vmName + accelMethod := "" if config.Accelerator != "none" { - defaultArgs["-machine"] = fmt.Sprintf("type=pc,accel=%s", config.Accelerator) + accelMethod = fmt.Sprintf(",accel=%s", config.Accelerator) } else { ui.Message("WARNING: The VM will be started with no hardware acceleration.\n" + - "The installation will take considerably longer to finish\n") + "The installation may take considerably longer to finish\n") } + defaultArgs["-machine"] = fmt.Sprintf("type=pc%s", accelMethod) defaultArgs["-netdev"] = "user,id=user.0" defaultArgs["-device"] = fmt.Sprintf("%s,netdev=user.0", config.NetDevice) defaultArgs["-drive"] = fmt.Sprintf("file=%s,if=%s", imgPath, config.DiskInterface)