crc: [BUG] Trying to run amd64 images on M1 arm fails

General information

  • OS: macOS
  • Hypervisor: default
  • Did you run crc setup before starting it (Yes/No)? Yes
  • Running CRC on: Laptop

CRC version

convery@Robs-M1 ibm-appconnect % crc version
CRC version: 2.12.0+ea98bb41
OpenShift version: 4.11.18
Podman version: 4.2.0

CRC status

DEBU CRC version: 2.12.0+ea98bb41                 
DEBU OpenShift version: 4.11.18                   
DEBU Podman version: 4.2.0                        
DEBU Running 'crc status'                         
CRC VM:          Running
OpenShift:       Running (v4.11.18)
RAM Usage:       8.041GB of 9.353GB
Disk Usage:      15.14GB of 32.74GB (Inside the CRC VM)
Cache Usage:     73.63GB
Cache Directory: /Users/convery/.crc/cache

CRC config

- consent-telemetry                     : no

Host Operating System

ProductName:		macOS
ProductVersion:		13.1
BuildVersion:		22C65

Steps to reproduce

  1. Add a catalog source which doesn’t have an ARM version but does have an amd64 version i.e.
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
 name: ibm-operator-catalog
 namespace: openshift-marketplace
spec:
 displayName: IBM Operator Catalog
 publisher: IBM
 sourceType: grpc
 image: icr.io/cpopen/ibm-operator-catalog
 updateStrategy:
   registryPoll:
     interval: 45m

Expected

I was hoping that it would be possible to get OCP to fall back and use the amd64 images like its possible on docker i.e. I can pull the image using docker pull -platform=linux/amd64 icr.io/cpopen/ibm-operator-catalog and then run it as a normal image using docker run icr.io/cpopen/ibm-operator-catalog

Is it possible to get it to run amd64 containers?

Actual

Pull fails due to Failed to pull image "icr.io/cpopen/ibm-operator-catalog": rpc error: code = Unknown desc = choosing image instance: no image found in manifest list for architecture arm64, variant "v8", OS linux

Logs

Before gather the logs try following if that fix your issue

$ crc delete -f
$ crc cleanup
$ crc setup
$ crc start --log-level debug

Please consider posting the output of crc start --log-level debug on http://gist.github.com/ and post the link in the issue.

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

I’m not sure why this isn’t possible. I can run a full amd64 kubernetes cluster with colima. I think they even figured out how to use Rosetta to make it as fast as possible. I get that this will be significantly slower with qemu emulation, even with Rosetta. Admittedly, I’m no expert here so there may be an openshift-specific issue I’m not aware of?

colima on the M1 starts an arm64 alpine virtual machine, and uses this virtual machine to run arm64 or amd64 container images. podman-machine, crc’s podman bundle, … are using the same approach. openshift can’t easily be run as a container, so we start an openshift virtual machine, not an openshift container inside a virtual machine.

And this is where the difference is, on the M1 you can only run arm64 virtual machines, not amd64 virtual machines (I guess you could run these through qemu emulation, but no idea how slow it would be)

Interesting!

Running an openshift arm64 instance, and starting some amd64 images on it might be doable

I think this would be useful if it were to work. Is it a large piece of work to enable the above?

The first step towards that is https://github.com/crc-org/snc/pull/713 which is merged now. This will be available when we release 4.13 bundles for openshift/microshift.

Interesting!

Running an openshift arm64 instance, and starting some amd64 images on it might be doable

I think this would be useful if it were to work. Is it a large piece of work to enable the above?

I would like to echo the above comment. This would be really useful for us.

Thank you 😄

As an Openshift Local/CRC user, being able to setup an AMD64 Local Openshift on Mac M1 would be awesome for development purposes.

Thank you for such an amazing tool!