dbhi / qus

qemu-user-static (qus) and containers, non-invasive minimal working setups

Home Page:https://dbhi.github.io/qus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can I run aarch64 containers on an arm32/v7 host?

zannet opened this issue · comments

commented

Yes, it is possible.

commented

@umarcor which images should i download on an arm32/v7 host, thanks

That depends on which container you want to run. QEMU does not care about which container is being executed; it just translates instructions from one architecture to the other at the kernel level.

If you don't have any experience, I would suggest to start with running e.g. arm64v8/ubuntu: https://hub.docker.com/r/arm64v8/ubuntu/.

commented

If you don't have any experience, I would suggest to start with running e.g. arm64v8/ubuntu: https://hub.docker.com/r/arm64v8/ubuntu/.

@umarcor Can i run this on an arm32/v7 host, i dont see an arm32 tag under Tags tab

commented

i have an arm32/v7 terminal(machine), i need to run aarch64 applications on it, can i do it with qus, tyvm for your info @umarcor

Can i run this on an arm32/v7 host, i dont see an arm32 tag under Tags tab

If the image provides a tag for arm32 then you don't need QUS.
You need QUS to emulate an unsupported architectures.
Try it!

@zannet, since you specified that you have a terminal(machine), I assume you are trying to run a container locally. As explained in the Usage section of the README, you should:

The recommended approach is to run the following container:

docker run --rm --privileged aptman/qus -s -- -p [TARGET_ARCH]

NOTE: since aptman/qus is a manifest, this command works on amd64, arm64v8, arm32v7, arm32v6, i386, s390x or ppc64le hosts.

The required qemu-*-static binaries (which are all included in the image) will be loaded and registered. The container will then > exit. From there on, images and/or binaries for foreign architectures can be executed.

Optional argument TARGET_ARCH is the target architecture to be translated through QEMU. If it is omitted, all available targets will be registered and loaded. The supported values are the following:

i386 i486 alpha arm armeb sparc32plus ppc ppc64 ppc64le m68k mips mipsel mipsn32 mipsn32el mips64 mips64el sh4 sh4eb s390x aarch64 aarch64_be hppa riscv32 riscv64 xtensa xtensaeb microblaze microblazeel or1k x86_64

Pay attention to: "From there on, images and/or binaries for foreign architectures can be executed".

For instance:

docker run --rm --privileged aptman/qus -s -- -p aarch64
docker run --rm -it arm64v8/ubuntu bash
commented

@umarcor thank you so much, i'll give it a try. on problem is, the machine can't connect to the internet, could i download aptman/qus image locally