[Bug]: Can't run amd64 container machine on Apple Silicon
- Dominant language
- Swift
- Stars
- 49.9k
- Forks
- 1.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 22
Description
### I have done the following
- [x] I have searched the existing issues
- [ ] If possible, I've reproduced the issue using the 'main' branch of this project
### Steps to reproduce
Follow the chapter [Bring your own container machine image](https://github.com/apple/container/blob/main/docs/container-machine.md#bring-your-own-container-machine-image) of container machine documentation with `--arch amd64` as parameter:
```shell
container build --arch amd64 -t local/ubuntu-machine:latest .
container machine create local/ubuntu-machine:latest --arch amd64 --name ubuntu
```
Run a command on that machine:
```shell
container machine run -n ubuntu uname -a
```
### Problem description
#### Expected Behavior
The machine information is printed on command line as is with `container run local/ubuntu-machine:latest`, e.g.:
```shell
$ container run --arch amd64 --rm local/ubuntu-machine:amd64 uname -a
Linux 9f6949cd-c2d0-4c47-af46-1b13a33a970e 6.12.28 #1 SMP Tue May 20 15:19:05 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
```
#### Seen Behaviour
Instead it reports an error:
```shell
$ container machine run -n ubuntu uname -a
Error: failed to exec [/sbin.machine/init -s uname] Error Domain=NSPOSIXErrorDomain Code=8 "Exec format error"
Error: failed to start process 66c65e9c-3ae1-429a-9fd0-7c61ad5d0134 in container ubuntu-87d6d8 (cause: "internalError: "failed to start process (cause: "internalError: "startProcess: failed to start process: internalError: "vmexec error: internalError: "failed to exec [/sbin.machine/init -s uname] Error Domain=NSPOSIXErrorDomain Code=8 "Exec format error""""")"")
```
### Environment
```markdown
- OS: macOS 26.5.1 (25F80)
- Xcode: 26.6 (17F113)
- Container: Container CLI version 1.0.0
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Research direction
Start with the documented “Bring your own container machine image” flow in docs/container-machine.md, reproducing the amd64 build, machine creation, and machine run commands. Trace the machine startup path from the reported /sbin.machine/init exec-format error; done means an amd64 machine on Apple Silicon runs uname successfully as the equivalent container run command does.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, swift
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100