kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.57k stars 4.89k forks source link

Mac M1: hyperkit not supported. #11885

Open NitichaiSawangsai opened 3 years ago

NitichaiSawangsai commented 3 years ago

Mac M1

Steps to reproduce the issue:

  1. arch -x86_64 brew install hyperkit
  2. minikube start --vm=true
  3. minikube start --driver=hyperkit

Full output of failed command:

$ minikube start --driver=hyperkit 
😄 minikube v1.21.0 on Darwin 11.4 (arm64) ✨ Using the hyperkit driver based on user configuration ❌ Exiting due to DRV_UNSUPPORTED_OS: The driver 'hyperkit' is not supported on darwin/arm64
spowelljr commented 3 years ago

Hi @NitichaiSawangsai, thanks for reporting your issue!

As shown in the message, minikube does not yet support hyperkit on M1 Macs.

This is something we're hoping to support in the future. For now you can use the Docker driver.

Hope that helps, thanks for using minikube!

k8s-triage-robot commented 3 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

sharifelgamal commented 2 years ago

We're going to work on implementing a qemu driver for a vm driver on arm64 darwin.

cedricjacobs commented 2 years ago

We're going to work on implementing a qemu driver for a vm driver on arm64 darwin.

Any clue when it is planned to be released?

spowelljr commented 2 years ago

Any clue when it is planned to be released?

The current tentative timeline puts it the end of Q2 2022.

ProbStub commented 2 years ago

@spowelljr @sharifelgamal I totally love my M1 but my love for Docker is much more limited and I see the issue remains unassigned. Is there a recommended best practice as a workaround while this is being worked on, e.g. using podman?

afbjorklund commented 2 years ago

You can use lima, as a workaround.

brew install lima

limactl start https://github.com/lima-vm/lima/blob/master/examples/k8s.yaml

It will use ubuntu and containerd.

spowelljr commented 2 years ago

We just released minikube v1.26.0-beta.0 that supports the QEMU driver --driver=qemu2.

https://github.com/kubernetes/minikube/releases/tag/v1.26.0-beta.0

greenchapter commented 2 years ago

We just released minikube v1.26.0-beta.0 that supports the QEMU driver --driver=qemu2.

https://github.com/kubernetes/minikube/releases/tag/v1.26.0-beta.0

Looks on the first sight very good 👏

tedgoddard commented 2 years ago

@spowelljr is it possible to specify the path to qemu? I get

🤷 Exiting due to PROVIDER_QEMU2_NOT_FOUND: The 'qemu2' provider was not found: lookup qemu: open /opt/homebrew/Cellar/qemu: no such file or directory

with an installation to /usr/local from source.

which qemu-system-aarch64
/usr/local/bin/qemu-system-aarch64

(This is also qemu 7, so perhaps I should install qemu 6)

sharifelgamal commented 2 years ago

@spowelljr is it possible to specify the path to qemu? I get

🤷 Exiting due to PROVIDER_QEMU2_NOT_FOUND: The 'qemu2' provider was not found: lookup qemu: open /opt/homebrew/Cellar/qemu: no such file or directory

with an installation to /usr/local from source.

which qemu-system-aarch64
/usr/local/bin/qemu-system-aarch64

(This is also qemu 7, so perhaps I should install qemu 6)

Not yet, this is something we're going to fix before the GA v1.26 release. Right now, we only look for a qemu installation from brew.

https://github.com/kubernetes/minikube/issues/14146 has more details about what's missing in the qemu driver.

sharifelgamal commented 2 years ago

@tedgoddard I merged a PR that should allow you to specify the path of the firmware file (usually edk2-aarch64-code.fd) you want to to use for qemu. We just look for a qemu-system-* binary in your PATH, so that should not be an issue. 

a1ex-var1amov commented 2 years ago

Hi everyone, Has anybody else faced this with qemu2?

❯ minikube start --driver qemu2 --memory=4Gb
😄  minikube v1.26.0-beta.1 on Darwin 12.4 (arm64)
✨  Using the qemu2 (experimental) driver based on existing profile
❗  You cannot change the memory size for an existing minikube cluster. Please first delete the cluster.
👍  Starting control plane node minikube in cluster minikube
🔄  Restarting existing qemu2 VM for "minikube" ...
OUTPUT:
ERROR: qemu-system-aarch64: Addressing limited to 32 bits, but memory exceeds it by 1073741824 bytes
sharifelgamal commented 2 years ago

yeah, this is a known issue (seen in https://github.com/kubernetes/minikube/issues/14273) that should be fixed at HEAD, and will be fixed when the GA v1.26.0 minikube release is out.

a1ex-var1amov commented 2 years ago

@sharifelgamal thank you so much!

0xleyth commented 2 years ago

I got it to work by doing:

brew install qemu

After the download, I did this:

minikube start --driver qemu --memory=4Gb

greenchapter commented 2 years ago

I got it to work by doing:

brew install qemu

After the download, I did this:

minikube start --driver qemu --memory=4Gb

Thanks that works, but it uses qemu and not Hyperkit 😉

afbjorklund commented 2 years ago

HyperKit is Intel-only, so the alternative to QEMU will be the new Virtualization.framework driver (whenever that is ready)

greenchapter commented 2 years ago

HyperKit is Intel-only, so the alternative to QEMU will be the new Virtualization.framework driver (whenever that is ready)

Ya, you're totally right 👍

rajjaiswalsaumya commented 2 years ago

Can we please document this to the quickstart for mac m1 ?

dmiyamasu commented 1 year ago

Can we please document this to the quickstart for mac m1 ?

Has the quickstart documentation been started for mac m1? I don't see the updates published.

greenchapter commented 1 year ago

Can we please document this to the quickstart for mac m1 ?

Has the quickstart documentation been started for mac m1? I don't see the updates published.

@dmiyamasu and @rajjaiswalsaumya there is a Apple Silicon documentation here → https://minikube.sigs.k8s.io/docs/start/ and also the QEMU startup flags are explained on the drivers page → https://minikube.sigs.k8s.io/docs/drivers/qemu/

I think that will help.

jgstew commented 6 months ago

This document also only mentions hyperkit and doesn't mention using qemu on apple silicon: https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/tutorials/docker_desktop_replacement.md