Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run amd64 image #27

Open
cdrage opened this issue May 6, 2024 · 5 comments
Open

Unable to run amd64 image #27

cdrage opened this issue May 6, 2024 · 5 comments

Comments

@cdrage
Copy link

cdrage commented May 6, 2024

I built an amd64 image using podman build --platform linux/amd64 -t fedora-helloworld-test .

I then tried running it with podman-bootc:

▶ podman-bootc run fedora-helloworld-test
WARNING: image platform (linux/amd64) does not match the expected platform (linux/arm64)
ERROR Re-exec in host mountns: setns: EINVAL: Invalid argument
ERROR Installing to disk: Gathering source info from container env: Task podman inspect failed: ExitStatus(unix_wait_status(256))
Error: unable to install bootc image: failed to create disk image: failed to run bootc install
@ckyrouac
Copy link
Collaborator

just to clarify - are you trying to run an amd64 image on an arm64 device?

@cdrage
Copy link
Author

cdrage commented May 15, 2024

Yup.

I'm expecting podman-bootc under the hood to choose qemu-system-aarch64 or qemu-system-x86_64 and run the image.

@rhatdan
Copy link
Member

rhatdan commented May 15, 2024

I don't believe that will work. You can not run a aarch64 VM/Kernel on an x86 box. Emulation works in user space not for the kernel, as I understand.

@cfergeau
Copy link
Contributor

I don't believe that will work. You can not run a aarch64 VM/Kernel on an x86 box. Emulation works in user space not for the kernel, as I understand.

qemu can do both, qemu-system-aarch64 will emulate a full aarch64 VM, qemu-aarch64 will emulate user space binaries.

@cgwalters
Copy link
Contributor

ERROR Re-exec in host mountns: setns: EINVAL: Invalid argument

The core problem here (and this has come up elsewhere) is that qemu's userspace emulation doesn't handle many Linux container features.

Here what we're trying to do is extract information about the container from the host podman. Hmm. Maybe we could switch to using data from the /var/lib/containers mount?

The other avenue here is we could use bootc-image-builder's flow in this case (or in general, by default), where it runs the install container with the host arch. That path is #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants