1
0
Fork 0

CPU model 'host' requires KVM

master
dump_stack() 2019-08-19 17:07:29 +00:00
parent e106eaa3e0
commit 338300eeec
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC
1 changed files with 2 additions and 3 deletions

View File

@ -213,7 +213,6 @@ func (q *System) Start() (err error) {
qemuArgs := []string{"-snapshot", "-nographic", qemuArgs := []string{"-snapshot", "-nographic",
"-hda", q.drivePath, "-hda", q.drivePath,
"-kernel", q.kernel.KernelPath, "-kernel", q.kernel.KernelPath,
"-cpu", "host",
"-smp", fmt.Sprintf("%d", q.Cpus), "-smp", fmt.Sprintf("%d", q.Cpus),
"-m", fmt.Sprintf("%d", q.Memory), "-m", fmt.Sprintf("%d", q.Memory),
"-device", "e1000,netdev=n1", "-device", "e1000,netdev=n1",
@ -229,11 +228,11 @@ func (q *System) Start() (err error) {
} }
if (q.arch == X86x64 || q.arch == X86x32) && kvmExists() { if (q.arch == X86x64 || q.arch == X86x32) && kvmExists() {
qemuArgs = append(qemuArgs, "-enable-kvm") qemuArgs = append(qemuArgs, "-enable-kvm", "-cpu", "host")
} }
if q.arch == X86x64 && runtime.GOOS == "darwin" { if q.arch == X86x64 && runtime.GOOS == "darwin" {
qemuArgs = append(qemuArgs, "-accel", "hvf") qemuArgs = append(qemuArgs, "-accel", "hvf", "-cpu", "host")
} }
qemuArgs = append(qemuArgs, "-append", q.cmdline()) qemuArgs = append(qemuArgs, "-append", q.cmdline())