Skip to content

Commit 57422d2

Browse files
Merge pull request #11120 from baude/3.3disablearm64
[v3.3] Disable aarch64 support
2 parents b1d3875 + b1c9c5b commit 57422d2

File tree

7 files changed

+20
-0
lines changed

7 files changed

+20
-0
lines changed

cmd/podman/machine/init.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ var (
2020
Args: cobra.MaximumNArgs(1),
2121
Example: `podman machine init myvm`,
2222
ValidArgsFunction: completion.AutocompleteNone,
23+
PreRunE: noAarch64,
2324
}
2425
)
2526

cmd/podman/machine/list.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ var (
3030
ValidArgsFunction: completion.AutocompleteNone,
3131
Example: `podman machine list,
3232
podman machine ls`,
33+
PreRunE: noAarch64,
3334
}
3435
listFlag = listFlagType{}
3536
)

cmd/podman/machine/machine.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
package machine
44

55
import (
6+
"errors"
7+
"runtime"
68
"strings"
79

810
"github.com/containers/podman/v3/cmd/podman/registry"
@@ -16,6 +18,18 @@ var (
1618
noOp = func(cmd *cobra.Command, args []string) error {
1719
return nil
1820
}
21+
// noAarch64 temporarily disables arm64 support on
22+
// Apple Silicon
23+
noAarch64 = func(cmd *cobra.Command, args []string) error {
24+
if runtime.GOARCH == "arm64" {
25+
if runtime.GOOS == "darwin" {
26+
return errors.New("due to missing upstream patches, Apple Silicon is not capable of running Podman machine yet")
27+
}
28+
return errors.New("no aarch64 images are available at this time")
29+
}
30+
return nil
31+
}
32+
1933
// Command: podman _machine_
2034
machineCmd = &cobra.Command{
2135
Use: "machine",

cmd/podman/machine/rm.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ var (
2323
Args: cobra.MaximumNArgs(1),
2424
Example: `podman machine rm myvm`,
2525
ValidArgsFunction: autocompleteMachine,
26+
PreRunE: noAarch64,
2627
}
2728
)
2829

cmd/podman/machine/ssh.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ var (
1919
Example: `podman machine ssh myvm
2020
podman machine ssh myvm echo hello`,
2121
ValidArgsFunction: autocompleteMachineSSH,
22+
PreRunE: noAarch64,
2223
}
2324
)
2425

cmd/podman/machine/start.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ var (
1919
Args: cobra.MaximumNArgs(1),
2020
Example: `podman machine start myvm`,
2121
ValidArgsFunction: autocompleteMachine,
22+
PreRunE: noAarch64,
2223
}
2324
)
2425

cmd/podman/machine/stop.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ var (
1818
Args: cobra.MaximumNArgs(1),
1919
Example: `podman machine stop myvm`,
2020
ValidArgsFunction: autocompleteMachine,
21+
PreRunE: noAarch64,
2122
}
2223
)
2324

0 commit comments

Comments
 (0)