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

Support x86_64 and aarch64 emulation #62

Open
ericcurtin opened this issue May 3, 2024 · 2 comments · May be fixed by #63
Open

Support x86_64 and aarch64 emulation #62

ericcurtin opened this issue May 3, 2024 · 2 comments · May be fixed by #63

Comments

@ericcurtin
Copy link

ericcurtin commented May 3, 2024

In the AI world there is a common usecase where people build and test their AI software on a macOS machine (because those aarch64 SoC's are decent for local AI development and not the size of the spaceship), but when they deploy to the cloud (lets say AWS) they need to build for x86_64 to use on some beefy powerful Nvidia/AMD GPU.

In the Automotive world there is the opposite use case, local developers hack away on an x86_64 machine, but when being deployed to the target it needs to be rebuilt for an aarch64 automotive board.

podman has a qemu-user-static solution, but it's not perfect, it doesn't perform exactly like the OS you are trying to emulate and hence osbuild doesn't work there today (amongst other things that don't work, using osbuild as the example here, simple applications work with qemu-user-static).

podman in recent times has at least 4 compatible runtimes (to my knowledge):

podman run --runtime runc
podman run --runtime crun
podman run --runtime krun
podman run --runtime crun-vm (qemu based)

It may be possible to extend crun-vm to use either (qemu-system-aarch64 or qemu-system-x86_64) as a fully emulated solution.

It would not be super fast (but this is no different to any of our existing solutions), but it would be correct as it would be a fully emulated solution, and people could iterate on x86/aarch64 using a plain-old:

podman run

and them when they want to do a test on an actual target device, they could do a slower emulated build via:

podman run --runtime crun-vm-x86_64

or

podman run --runtime crun-vm-aarch64

@ericcurtin
Copy link
Author

ericcurtin commented May 3, 2024

Or I think you were proposing:

podman run --arch=aarch64 --runtime crun-vm

@albertofaria so we can ignore:

podman run --runtime crun-vm-aarch64

etc.

@ericcurtin
Copy link
Author

albertofaria added a commit that referenced this issue May 8, 2024
When combined with --emulated, this enables running VMs with an
architecture different from the host's.

Closes #62.

Signed-off-by: Alberto Faria <afaria@redhat.com>
@albertofaria albertofaria linked a pull request May 8, 2024 that will close this issue
2 tasks
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

Successfully merging a pull request may close this issue.

1 participant