Skip to content

Commit

Permalink
cpu: workaround for broken qemu64 (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
abiosoft authored May 18, 2022
1 parent 5d39343 commit 1ec5c82
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions environment/vm/lima/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,20 @@ import (
)

func newConf(ctx context.Context, conf config.Config) (l Config, err error) {
l.Arch = environment.Arch(conf.Arch).Value()
{
l.Arch = environment.Arch(conf.Arch).Value()

if conf.CPUType != "" && conf.CPUType != "host" {
l.CPUType = map[environment.Arch]string{
l.Arch: conf.CPUType,
if conf.CPUType != "" && conf.CPUType != "host" {
l.CPUType = map[environment.Arch]string{
l.Arch: conf.CPUType,
}
}

sameAsHostArch := l.Arch == environment.HostArch().Value()
if conf.CPUType == "qemu64" || (!sameAsHostArch && l.Arch == environment.X8664 && conf.CPUType == "") {
l.CPUType = map[environment.Arch]string{
l.Arch: "kvm64",
}
}
}

Expand Down

0 comments on commit 1ec5c82

Please sign in to comment.