All original content is created in Ukrainian. Not all content has been translated yet. Some posts may only be available in Ukrainian.Learn more

Fixing minikube on Mac with M1 (abandoning qemu, running on docker)

This content has been automatically translated from Ukrainian.
On Mac with M1, it's not so simple with minikube. After its installation, I encountered another error:
๐Ÿ˜„  minikube v1.35.0 on Darwin 14.1.2 (arm64)
โœจ  Using the qemu2 driver based on user configuration

๐Ÿคท  Exiting due to PROVIDER_QEMU2_NOT_FOUND: The 'qemu2' provider was not found: exec: "qemu-system-aarch64": executable file not found in $PATH
๐Ÿ’ก  Suggestion: Install qemu-system
๐Ÿ“˜  Documentation: https://minikube.sigs.k8s.io/docs/reference/drivers/qemu/
Here you need to put in some effort.
We install qemu (yes, without 2)
brew install qemu
Then we do this trick to fix qemu issues (edk2-aarch64-code.fd). We will download edk2-aarch64-code.fd manually
curl -L -o edk2-aarch64-code.fd https://releases.linaro.org/components/kernel/uefi/edk2/latest/release/qemu64/edk2-aarch64-code.fd
Then we repeat the structure of directories and file:
sudo mkdir -p /opt/homebrew/opt/qemu/share/qemu
sudo mv edk2-aarch64-code.fd /opt/homebrew/opt/qemu/share/qemu/
After this, it should work:
minikube start --driver=qemu2
But after starting, it turns out that qemu will crash due to the accelerator, which does not work on M1. So we need to look for other options.
๐Ÿ˜„  minikube v1.35.0 on Darwin 14.1.2 (arm64)
โœจ  Using the qemu2 driver based on user configuration
๐ŸŒ  Automatically selected the builtin network
โ—  You are using the QEMU driver without a dedicated network, which doesn't support minikube service & minikube tunnel commands.
To try the dedicated network see: https://minikube.sigs.k8s.io/docs/drivers/qemu/#networking
๐Ÿ’ฟ  Downloading VM boot image ...
    > minikube-v1.35.0-arm64.iso....:  65 B / 65 B [---------] 100.00% ? p/s 0s
    > minikube-v1.35.0-arm64.iso:  393.15 MiB / 393.15 MiB  100.00% 6.28 MiB p/
๐Ÿ‘  Starting "minikube" primary control-plane node in "minikube" cluster
๐Ÿ’พ  Downloading Kubernetes v1.32.0 preload ...
    > preloaded-images-k8s-v18-v1...:  314.92 MiB / 314.92 MiB  100.00% 6.30 Mi
๐Ÿ”ฅ  Creating qemu2 VM (CPUs=4, Memory=4096MB, Disk=15000MB) ...\ OUTPUT: 
ERROR: qemu-system-aarch64: -accel hvf: invalid accelerator hvf


๐Ÿ”ฅ  Deleting "minikube" in qemu2 ...
๐Ÿคฆ  StartHost failed, but will try again: creating host: create: creating: qemu-system-aarch64: -accel hvf: invalid accelerator hvf: exit status 1
๐Ÿ”ฅ  Creating qemu2 VM (CPUs=4, Memory=4096MB, Disk=15000MB) ...\ OUTPUT: 
ERROR: qemu-system-aarch64: -accel hvf: invalid accelerator hvf


๐Ÿ˜ฟ  Failed to start qemu2 VM. Running "minikube delete" may fix it: creating host: create: creating: qemu-system-aarch64: -accel hvf: invalid accelerator hvf: exit status 1
We give up on qemu and start minikube using the docker driver.
Install Docker (download the .dmg for arm64) from the official site. If you try to start immediately with the docker driver, you will get an error. You need to delete the existing minikube container:
minikube start --driver=docker

๐Ÿ˜„  minikube v1.35.0 on Darwin 14.1.2 (arm64)

๐Ÿ’ข  Exiting due to GUEST_DRIVER_MISMATCH: The existing "minikube" cluster was created using the "qemu2" driver, which is incompatible with requested "docker" driver.
๐Ÿ’ก  Suggestion: Delete the existing 'minikube' cluster using: 'minikube delete', or start the existing 'minikube' cluster using: 'minikube start --driver=qemu2'
We delete the container:
minikube delete

๐Ÿ”ฅ  Deleting "minikube" in qemu2 ...
๐Ÿ’€  Removed all traces of the "minikube" cluster.
And then everything is simple:
minikube start --driver=docker

๐Ÿ˜„  minikube v1.35.0 on Darwin 14.1.2 (arm64)
โœจ  Using the docker driver based on user configuration
๐Ÿ“Œ  Using Docker Desktop driver with root privileges
๐Ÿ‘  Starting "minikube" primary control-plane node in "minikube" cluster
๐Ÿšœ  Pulling base image v0.0.46 ...
    > gcr.io/k8s-minikube/kicbase...:  452.84 MiB / 452.84 MiB  100.00% 6.76 Mi
๐Ÿ”ฅ  Creating docker container (CPUs=4, Memory=4096MB) ...
๐Ÿณ  Preparing Kubernetes v1.32.0 on Docker 27.4.1 ...
    โ–ช Generating certificates and keys ...
    โ–ช Booting up control plane ...
    โ–ช Configuring RBAC rules ...
๐Ÿ”—  Configuring bridge CNI (Container Networking Interface) ...
๐Ÿ”Ž  Verifying Kubernetes components...
    โ–ช Using image gcr.io/k8s-minikube/storage-provisioner:v5
๐ŸŒŸ  Enabled addons: storage-provisioner, default-storageclass
๐Ÿ„  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
The created container will be visible in the Docker application.
minikube + docker
minikube + docker

This post doesn't have any additions from the author yet.

Embedded programming: what it is and how to get started
Mar 24, '25 16:48

Embedded programming: what it is and how to get started

Pessimistic Lock in Rails: what it is and when to use it. What are the alternatives?
Mar 31, '25 17:45

Pessimistic Lock in Rails: what it is and when to use it. What are the alternatives?

Why does PostgreSQL skip IDs when saving new records? (Heroku)
Mar 31, '25 19:13

Why does PostgreSQL skip IDs when saving new records? (Heroku)

[Codecov] What is the difference between patch and project coverage?
Apr 9, '25 16:03

[Codecov] What is the difference between patch and project coverage?

How do Scratch courses help children develop soft skills?
Apr 11, '25 18:24

How do Scratch courses help children develop soft skills?

Apr 24, '25 20:17

Fixing minikube "You are trying to run the amd64 binary on an M1 system."

Where to find an older version of Google Chrome and download it? Using an old Mac as an example.
Apr 25, '25 23:02

Where to find an older version of Google Chrome and download it? Using an old Mac as an example.

May 9, '25 19:27

[FIXED] cannot load such file -- html/pipeline (LoadError) occurs during rails generate thredded:install

Task: Convert a Roman numeral to decimal (Ruby)
May 20, '25 12:05

Task: Convert a Roman numeral to decimal (Ruby)

Task to check the correctness of bracket placement (Ruby)
May 21, '25 10:27

Task to check the correctness of bracket placement (Ruby)

How to find the maximum subarray sum in Ruby
May 22, '25 11:01

How to find the maximum subarray sum in Ruby

Google Ads for Dummies: A Step-by-Step Guide for a Successful Start
May 28, '25 10:21

Google Ads for Dummies: A Step-by-Step Guide for a Successful Start