kubernetes / minikube

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

qemu not working on my M2 Mac #17020

Closed maitrid closed 9 months ago

maitrid commented 1 year ago

What Happened?

It has "Unknown Error" when tried according to the instructions.

Attach the log file

logs.txt

Operating System

macOS (Default)

Driver

QEMU

afbjorklund commented 1 year ago

Looks like it tries to run the wrong architecture:

Exiting due to GUEST_PROVISION: error provisioning guest: Failed to start host: creating host: create: creating: qemu-system-x86_64: -accel hvf: Unknown Error: exit status 1

That should have been aarch64

Install minikube for darwin/arm64, as instructed.

k8s-triage-robot commented 9 months ago

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

This bot triages un-triaged issues according to the following rules:

You can:

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

/lifecycle stale

caerulescens commented 9 months ago

@maitrid The error you're receiving indicates that you have installed the incorrect minikube binary for your computer processor's architecture type; your laptop has an Apple M1 processor which uses arm64 for its processor's instruction set, which is also known as aarch64. You installed the minikube binary for 64-bit x86 architecture processors. When Apple switched from purchasing Intel processors to designing their own chips, their processor's architecture type changed from 64-bit x86 (amd64) to 64-bit arm (arm64). Apple computers with M series processors need to install the darwin/arm64 minikube binary. You should use either Homebrew or MacPorts to manage your minikube installation, and you won't have this issue going forward.

After installing the correct minikube binary, you can use qemu2 driver and socket_vmnet network to get the essential minikube functionality on macos with m-series chips.

  1. Install qemu.
  2. Install socket_vmnet.
  3. I think you will need to start the network like mentioned here in the docs.
  4. Run minikube start --driver=qemu2 --network=socket_vmnet
  5. Test minikube tunnel in a separate terminal window.
caerulescens commented 9 months ago

/assign @caerulescens

caerulescens commented 9 months ago

This is not an issue with minikube; an amd64 binary is being run on arm64 host.

/close

k8s-ci-robot commented 9 months ago

@caerulescens: Closing this issue.

In response to [this](https://github.com/kubernetes/minikube/issues/17020#issuecomment-1913783109): >This is not an issue with `minikube`; an `amd64` binary is being run on `arm64` host. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.