talos/pkg/provision/providers/qemu/arch_linux.go
Orzelius 3a1163692d
chore: cross platform qemu preflight checks
* split platform specific preflight checks into platform specific files
* error on darwin if target is amd64
* error on darwin if host platform is amd64
* add darwin specific var-file and pflash file locations
* remove hard kvm requirement (so linux logic can be tested on machines without kvm)

Signed-off-by: Orzelius <33936483+Orzelius@users.noreply.github.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-05-01 14:44:29 +04:00

19 lines
458 B
Go

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package qemu
import "runtime"
const accelerator = "kvm"
func (arch Arch) acceleratorAvailable() bool {
if err := checkKVM(); err != nil {
return false
}
// kvm only supports emulating native architectures
return string(arch) == runtime.GOARCH
}