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

Installing arm64 emulator on CentOS 7: invalid argument #2957

Closed
marcelstoer opened this issue Jul 11, 2022 · 3 comments
Closed

Installing arm64 emulator on CentOS 7: invalid argument #2957

marcelstoer opened this issue Jul 11, 2022 · 3 comments

Comments

@marcelstoer
Copy link

marcelstoer commented Jul 11, 2022

I am coming from https://github.com/docker/buildx more specifically docker/buildx#495 as well as #1929 and #1943. Just to complete my analysis I also checked tonistiigi/binfmt#92.

I am now utterly confused as to which of the three projects to create an issue with.

I cannot seem to install the arm64 emulator on a Linux CI host (works fine on my macOS of course). None of the hints in the other issues fixed this so far.

[admin@t8tstjnode10 binfmt_misc]$ docker buildx ls
NAME/NODE               DRIVER/ENDPOINT             STATUS  PLATFORMS
intelligent_driscoll *  docker-container                    
  intelligent_driscoll0 unix:///var/run/docker.sock running linux/amd64, linux/amd64/v2, linux/386
default                 docker                              
  default               default                     running linux/amd64, linux/386
[admin@t8tstjnode10 binfmt_misc]$  docker run --privileged --rm tonistiigi/binfmt --install arm64
installing: arm64 cannot register "/usr/bin/qemu-aarch64" to /proc/sys/fs/binfmt_misc/register: write /proc/sys/fs/binfmt_misc/register: invalid argument
{
  "supported": [
    "linux/amd64",
    "linux/386"
  ],
  "emulators": null
}

As for my environment:

[admin@t8tstjnode10 binfmt_misc]$ docker --version
Docker version 20.10.17, build 100c701
[admin@t8tstjnode10 binfmt_misc]$ docker run --privileged --rm tonistiigi/binfmt --version
binfmt/1aa2eba qemu/v6.2.0 go/1.17.8
[admin@t8tstjnode10 binfmt_misc]$ uname -srm
Linux 3.10.0-1160.66.1.el7.x86_64 x86_64
[admin@t8tstjnode10 binfmt_misc]$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
[admin@t8tstjnode10 ~]$ cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)

Trying to reset the qemu-user-static yields the same invalid argument response:

[admin@t8tstjnode10 binfmt_misc]$ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
Setting /usr/bin/qemu-alpha-static as binfmt interpreter for alpha
sh: write error: Invalid argument
Setting /usr/bin/qemu-arm-static as binfmt interpreter for arm
...
@marcelstoer
Copy link
Author

marcelstoer commented Jul 12, 2022

Oh, according to https://medium.com/@artur.klauser/building-multi-architecture-docker-images-with-buildx-27d80f7e2408 kernel version >=4.8 is required for multi-arch builds.

Also hidden in some sentence in the 6th paragraph at https://docs.docker.com/buildx/working-with-buildx/#build-multi-platform-images.

@marcelstoer
Copy link
Author

And it looks like multiarch/qemu-user-static#100 has relevant information, too. <goes-digging>...

@marcelstoer
Copy link
Author

Conclusion: upgrade to CentOS 8.

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

1 participant