Commit b8c13d3e authored by Matthew Baker's avatar Matthew Baker

Keeping the -machine type=pc if accelerator method set to "none"

parent 99d15abf
...@@ -77,12 +77,14 @@ func getCommandArgs(bootDrive string, state multistep.StateBag) ([]string, error ...@@ -77,12 +77,14 @@ func getCommandArgs(bootDrive string, state multistep.StateBag) ([]string, error
} }
defaultArgs["-name"] = vmName defaultArgs["-name"] = vmName
accelMethod := ""
if config.Accelerator != "none" { if config.Accelerator != "none" {
defaultArgs["-machine"] = fmt.Sprintf("type=pc,accel=%s", config.Accelerator) accelMethod = fmt.Sprintf(",accel=%s", config.Accelerator)
} else { } else {
ui.Message("WARNING: The VM will be started with no hardware acceleration.\n" + 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["-netdev"] = "user,id=user.0"
defaultArgs["-device"] = fmt.Sprintf("%s,netdev=user.0", config.NetDevice) defaultArgs["-device"] = fmt.Sprintf("%s,netdev=user.0", config.NetDevice)
defaultArgs["-drive"] = fmt.Sprintf("file=%s,if=%s", imgPath, config.DiskInterface) defaultArgs["-drive"] = fmt.Sprintf("file=%s,if=%s", imgPath, config.DiskInterface)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment