Is it possible to import a Debian armhf (32 bit ARM) QEMU VM and run it on a t4g.small Graviton instance

0

I followed the instructions to upload a 4.6GB Debian 11.3 armhf disk image to an S3 bucket and then import the image from the S3 bucket. I ran the following command:

aws ec2 import-image --description "Debian 11.3 armhf" --disk-containers file://$PWD/containers.json

containers.json

[
  {
    "Description": "debianhf-aws",
    "Format": "raw",
    "UserBucket": {
        "S3Bucket": "debianabcdefg",
        "S3Key": "abcdefg/debianhf-aws.img"
    }
  }
]

I then checked status with this:

aws ec2 describe-import-image-tasks --import-task-ids import-ami-abcdefg

And get the following error:

IMPORTIMAGETASKS        Debian 11.3 armhf  import-ami-abcdefg    deleted ClientError: Unsupported kernel version 5.10.0-16-armmp-lpae
SNAPSHOTDETAILS debianhf-aws       /dev/sde        4939212800.0    RAW     completed
USERBUCKET      debianabcdefg      abcdefg/debianhf-aws.img

I looked at the name of the kernel used on an arm64 t4g.small instance I started, and I see the following two packages:

  • linux-image-5.10.0-14-cloud-arm64
  • linux-image-cloud-arm64

I looked to see if there's an equivalent "cloud-armmp-lpae" image, but so far nothing comes up. I was wondering if there happens to be a kernel I could locate that would allow me to boot directly into an armhf Debian VM instead of only arm64.

It is possible to emulate armhf using QEMU on an arm64 VM, but this nested virtualization is too slow without KVM support and isn't reliable for what I'm trying to do. I want to quickly build and test Selenium container images for x86_64, arm64, and armhf platforms. Because of the prevalence of x86_64 and even arm64 instances, it takes less than 5 minutes to build and test these container images, but when emulation is involved, it takes 10 times longer (50+ minutes) to build the container images, and testing is impossible since the browsers crash under emulation.

Does anyone know of a suitable 32 bit ARM kernel (not arm64/aarch64 but actual 32 bit arm) that can be used with EC2? I prefer Debian/Ubuntu, but I can use other distros if it gets the job done.

  • Have you considered using a 32-bit container?

asked 2 years ago749 views
2 Answers
0

EC2 doesn't offer any 32-bit arm instance types, so you'd have to use an emulator to run a 32-bit OS on a Graviton instance.

wash
answered 2 years ago
  • Thanks for the reply. I was hoping to be able to run an arm32 OS directly on a Graviton. I have tried every which way using an emulator, and the performance is just too slow to function properly. I'll keep looking for other options. Thank you!

0

Graviton 2 and 3 support running 32bit userspace armhf (arm32v7) code natively -- no emulation required. You cannot run a 32-bit kernel though, that is not supported by the hardware.

If all you need is 32-bit user-space, I'd suggest either using a container that is built for armv7, like arm32v7/debian, or you can compile your tools on a 64-bit OS like Ubuntu directly using for example crossbuild-essential-armhf.

AWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions