diff options
author | baude <baude@baudes-Mac-mini.localdomain> | 2021-08-03 13:09:06 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2021-08-03 13:41:45 -0500 |
commit | b1c9c5b5f1d5b45bf8e1f56f828aaadd7ad524c3 (patch) | |
tree | b3c6cb0ac4a193db0f18bc08b783e6936d19ce9f | |
parent | b1d38753255e0ec4d02574964b4a3fcc748c4820 (diff) | |
download | podman-b1c9c5b5f1d5b45bf8e1f56f828aaadd7ad524c3.tar.gz podman-b1c9c5b5f1d5b45bf8e1f56f828aaadd7ad524c3.tar.bz2 podman-b1c9c5b5f1d5b45bf8e1f56f828aaadd7ad524c3.zip |
Disable aarch64 support
until we have a fedora coreos images officially on aarch64, we cannot run podman machine on aarch64 linux. Moreover, on Apple Silicon, we need upstream patches for qemu to be merged and release.
[NO TESTS NEEDED]
Signed-off-by: Brent Baude <bbaude@redhat.com>
-rw-r--r-- | cmd/podman/machine/init.go | 1 | ||||
-rw-r--r-- | cmd/podman/machine/list.go | 1 | ||||
-rw-r--r-- | cmd/podman/machine/machine.go | 14 | ||||
-rw-r--r-- | cmd/podman/machine/rm.go | 1 | ||||
-rw-r--r-- | cmd/podman/machine/ssh.go | 1 | ||||
-rw-r--r-- | cmd/podman/machine/start.go | 1 | ||||
-rw-r--r-- | cmd/podman/machine/stop.go | 1 |
7 files changed, 20 insertions, 0 deletions
diff --git a/cmd/podman/machine/init.go b/cmd/podman/machine/init.go index f4133dbde..dfdedefca 100644 --- a/cmd/podman/machine/init.go +++ b/cmd/podman/machine/init.go @@ -20,6 +20,7 @@ var ( Args: cobra.MaximumNArgs(1), Example: `podman machine init myvm`, ValidArgsFunction: completion.AutocompleteNone, + PreRunE: noAarch64, } ) diff --git a/cmd/podman/machine/list.go b/cmd/podman/machine/list.go index 134a081ab..d23dbbbde 100644 --- a/cmd/podman/machine/list.go +++ b/cmd/podman/machine/list.go @@ -30,6 +30,7 @@ var ( ValidArgsFunction: completion.AutocompleteNone, Example: `podman machine list, podman machine ls`, + PreRunE: noAarch64, } listFlag = listFlagType{} ) diff --git a/cmd/podman/machine/machine.go b/cmd/podman/machine/machine.go index b059afc38..848a0715e 100644 --- a/cmd/podman/machine/machine.go +++ b/cmd/podman/machine/machine.go @@ -3,6 +3,8 @@ package machine import ( + "errors" + "runtime" "strings" "github.com/containers/podman/v3/cmd/podman/registry" @@ -16,6 +18,18 @@ var ( noOp = func(cmd *cobra.Command, args []string) error { return nil } + // noAarch64 temporarily disables arm64 support on + // Apple Silicon + noAarch64 = func(cmd *cobra.Command, args []string) error { + if runtime.GOARCH == "arm64" { + if runtime.GOOS == "darwin" { + return errors.New("due to missing upstream patches, Apple Silicon is not capable of running Podman machine yet") + } + return errors.New("no aarch64 images are available at this time") + } + return nil + } + // Command: podman _machine_ machineCmd = &cobra.Command{ Use: "machine", diff --git a/cmd/podman/machine/rm.go b/cmd/podman/machine/rm.go index 02e3dfeb8..a175a7388 100644 --- a/cmd/podman/machine/rm.go +++ b/cmd/podman/machine/rm.go @@ -23,6 +23,7 @@ var ( Args: cobra.MaximumNArgs(1), Example: `podman machine rm myvm`, ValidArgsFunction: autocompleteMachine, + PreRunE: noAarch64, } ) diff --git a/cmd/podman/machine/ssh.go b/cmd/podman/machine/ssh.go index b52a48faf..07666e444 100644 --- a/cmd/podman/machine/ssh.go +++ b/cmd/podman/machine/ssh.go @@ -19,6 +19,7 @@ var ( Example: `podman machine ssh myvm podman machine ssh myvm echo hello`, ValidArgsFunction: autocompleteMachineSSH, + PreRunE: noAarch64, } ) diff --git a/cmd/podman/machine/start.go b/cmd/podman/machine/start.go index f8f0eed09..ebbfd263e 100644 --- a/cmd/podman/machine/start.go +++ b/cmd/podman/machine/start.go @@ -19,6 +19,7 @@ var ( Args: cobra.MaximumNArgs(1), Example: `podman machine start myvm`, ValidArgsFunction: autocompleteMachine, + PreRunE: noAarch64, } ) diff --git a/cmd/podman/machine/stop.go b/cmd/podman/machine/stop.go index 2d5aa7b95..ff99bdef3 100644 --- a/cmd/podman/machine/stop.go +++ b/cmd/podman/machine/stop.go @@ -18,6 +18,7 @@ var ( Args: cobra.MaximumNArgs(1), Example: `podman machine stop myvm`, ValidArgsFunction: autocompleteMachine, + PreRunE: noAarch64, } ) |