Merge pull request #2291 from mitchellh/b-qemu-default

builder/qemu: default acceleration to tcg on Windows [GH-2284]
This commit is contained in:
Mitchell Hashimoto 2015-06-23 09:34:07 -07:00
commit 3fac725a55
1 changed files with 6 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import (
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"runtime"
"strings" "strings"
"time" "time"
@ -153,8 +154,12 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
} }
if b.config.Accelerator == "" { if b.config.Accelerator == "" {
if runtime.GOOS == "windows" {
b.config.Accelerator = "tcg"
} else {
b.config.Accelerator = "kvm" b.config.Accelerator = "kvm"
} }
}
if b.config.HTTPPortMin == 0 { if b.config.HTTPPortMin == 0 {
b.config.HTTPPortMin = 8000 b.config.HTTPPortMin = 8000