2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2025-06-24 06:02:26 +00:00

centos-stream-9: fix Dockerfile template

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
2024-07-09 18:32:19 +02:00
parent f711f8919d
commit e31bc93074
6 changed files with 26 additions and 12 deletions

View File

@ -203,12 +203,10 @@ func (c *config) buildQemuCmdline() ([]string, error) {
// Need to specify the vcpu type when running qemu on arm64 platform, for security reason,
// the vcpu should be "host" instead of other names such as "cortex-a53"...
if c.arch == "aarch64" {
if runtime.GOARCH == "arm64" {
qemuArgs = append(qemuArgs, "-cpu", "host")
} else {
qemuArgs = append(qemuArgs, "-cpu", "cortex-a57")
}
if c.arch == "aarch64" && runtime.GOARCH != "arm64" {
qemuArgs = append(qemuArgs, "-cpu", "cortex-a57")
} else {
qemuArgs = append(qemuArgs, "-cpu", "host")
}
// goArch is the GOARCH equivalent of config.Arch