ARM Emulation on x86 Amazon Linux 2/1/Centos — Ubuntu/Debian

$ uname -m # Display the host architecture 
x86_64
# Run aarch64 on x86_64
$ docker run --rm -t arm64v8/ubuntu uname -m
standard_init_linux.go:211: exec user process caused "exec format error"
standard_init_linux.go:211: exec user process caused "exec format error"
# Install the qemu packages
$ sudo apt-get install qemu binfmt-support qemu-user-static
# This step will execute the registering scripts
$ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# Testing the emulation environment
$ docker run --rm -t arm64v8/ubuntu uname -m
aarch64

The first part of the article is not mine.

ARM Emulation on x86 Amazon Linux 2 / 1 / Centos

Requirements:

standard_init_linux.go:211: exec user process caused "exec format error"
$ yum install qemu-user qemu-*-static qemu-kvm-tools qemu-kvm virt-install libvirt libvirt-python libguestfs-tools-c qemu-system-aarch64 glib2-devel pixman-devel -y
$ wget https://raw.githubusercontent.com/qemu/qemu/master/scripts/qemu-binfmt-conf.sh$ wget https://raw.githubusercontent.com/multiarch/qemu-user-static/master/containers/latest/register.sh$ chmod 777 qemu-binfmt-conf.sh register.sh
$ ./register.sh
$ sudo reboot
$ chmod 777 qemu-binfmt-conf.sh register.sh
$ mv qemu-binfmt-conf.sh qemu-binfmt-conf
$ mv register.sh register
$ mv * /etc/rc.d/init.d/
$ ls /etc/rc.d/init.d/
$ vi /etc/rc.local
$ cat /etc/rc.local

--

--

--

DevOps SR | SRE @Miroculus.com San Francisco, CA www.itshellws.org

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

All you need to know about using Elasticsearch in Python.

API gateway for microservice with Kong

Announcing The Mirror: The Metaverse Building Platform

The Unofficial Guide to Becoming a Front End Developer.

Community of practice in the wider testing community

Tutorial: Automating Customer Service Easily Using Freshdesk and Slack in 10 mins!

Kubernetes API support

What I Learned This Week (29-Mar-2022 to 04-Apr-2022)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ezequiel Arielli

Ezequiel Arielli

DevOps SR | SRE @Miroculus.com San Francisco, CA www.itshellws.org

More from Medium

AWS Cognito is not DB, but just Authorization and Autication Service.

How to work with multiple AWS CLI accounts

LAMP (Linux, Apache, MySQL, PHP) Stack-On AWS Cloud

Forbidden Reply form the AWS API Gateway