builder/qemu: default acceleration to tcg on Windows [GH-2284]

This commit is contained in:
Mitchell Hashimoto 2015-06-22 17:56:35 -07:00
parent b77042dc85
commit 5852bd7cd7
1 changed files with 6 additions and 1 deletions

View File

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