talos/pkg/provision/providers/qemu/preflight_darwin.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

24 lines
602 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 (
"context"
"errors"
"runtime"
)
func (check *preflightCheckContext) verifyPlatformSpecific(ctx context.Context) error {
return check.verifyAppleMachine(ctx)
}
func (check *preflightCheckContext) verifyAppleMachine(context.Context) error {
if runtime.GOARCH != "arm64" {
return errors.New("currently qemu on darwin is supported only on arm machines")
}
return nil
}