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

virtualbox: unable to start minikube on macOS Ventura #15274

Open
andriymahats opened this issue Nov 2, 2022 · 36 comments
Open

virtualbox: unable to start minikube on macOS Ventura #15274

andriymahats opened this issue Nov 2, 2022 · 36 comments
Labels
co/virtualbox kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. os/macos priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@andriymahats
Copy link

What Happened?

After upgrading macOS to Ventura from Monterey the minikube start started to fail with the response:

πŸ˜„  minikube v1.27.1 on Darwin 13.0
✨  Using the virtualbox driver based on user configuration
πŸ‘  Starting control plane node minikube in cluster minikube
πŸ”₯  Creating virtualbox VM (CPUs=2, Memory=8192MB, Disk=20000MB) ...
πŸ”₯  Deleting "minikube" in virtualbox ...
🀦  StartHost failed, but will try again: creating host: create: creating: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue
πŸ”₯  Creating virtualbox VM (CPUs=2, Memory=8192MB, Disk=20000MB) ...
😿  Failed to start virtualbox VM. Running "minikube delete" may fix it: creating host: create: creating: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue

❌  Exiting due to IF_VBOX_NOT_VISIBLE: Failed to start host: creating host: create: creating: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue
πŸ’‘  Suggestion: Reboot to complete VirtualBox installation, verify that VirtualBox is not blocked by your system, and/or use another hypervisor
πŸ“˜  Documentation: https://stackoverflow.com/questions/52277019/how-to-fix-vm-issue-with-minikube-start
🍿  Related issues:
    β–ͺ https://github.com/kubernetes/minikube/issues/3614
    β–ͺ https://github.com/kubernetes/minikube/issues/4222
    β–ͺ https://github.com/kubernetes/minikube/issues/5817

Attach the log file

log.txt

Operating System

macOS (Default)

Driver

VirtualBox

@crengifo
Copy link

crengifo commented Nov 3, 2022

same issue, i've tried minikube delete and start and update virtualbox and nothing...

@hakjoonglee
Copy link

Same issue. I also tried minikube delete and start and updated VirtualBox version 7.0.2

@TestRep1
Copy link

TestRep1 commented Nov 4, 2022

i have exactly the same issue.. Has anyone found a solution to this problem?

@crengifo
Copy link

crengifo commented Nov 7, 2022

Update 7.02 virtual box, solved the problem for me directly from virtual box site

@spowelljr spowelljr added kind/bug Categorizes issue or PR as related to a bug. co/virtualbox labels Nov 7, 2022
@spowelljr
Copy link
Member

@crengifo So it's working for you now on macOS Ventura with VirtualBox 7.02?

@andriymahats
Copy link
Author

Update 7.02 virtual box, solved the problem for me directly from virtual box site

hmm, tried to reinstall latest virtual box (7.0.2 r154219). Issue remains for me

@crengifo
Copy link

crengifo commented Nov 7, 2022

@crengifo So it's working for you now on macOS Ventura with VirtualBox 7.02?

Yes, reinstalling obviously.

@nrudnyk
Copy link

nrudnyk commented Nov 9, 2022

Update 7.02 virtual box, solved the problem for me directly from virtual box site

didn't helped. Still facing same problem as described in the OP

@chris15mLW
Copy link

ugh I've tried everything -still an issue

@W07FP4X
Copy link

W07FP4X commented Nov 14, 2022

Same. Host only adapters are no longer supported on mac. I'm running podman until we get a VB driver update.
brew install podman
podman machine init --cpus 2 --memory 2048 --rootful
podman machine start
minikube config set driver podman
minikube start
minikube status

@DmitriyStoyanov
Copy link

image

Possibly we face with such issue because of in VirtualBox Host-only Adapter is DEPRECATED

@martininnotec
Copy link

@DmitriyStoyanov yep this is definitely the reason - as @W07FP4X said it's because Host-only adapters are no longer supported on Mac OS, we need to use a Host-only network instead.

I've configured my virtual machine manually to use this network setup and can connect to Minikube on the running VM.

Screenshot 2022-11-18 at 08 07 29

Screenshot 2022-11-18 at 08 07 36

Screenshot 2022-11-18 at 08 08 33

The only problem is the Minikube start command still wants to create/see a host-only adapter so fails and it doesn't seem to be able to see the running VM.

Unfortunately, I think we will need to look at running alternatives like Docker or Podman until a Virtualbox driver update for Minikube is released.

@spowelljr spowelljr added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. os/macos labels Nov 18, 2022
@spowelljr
Copy link
Member

Thanks for discovering the root cause of the issue, I believe the change will need to be in the upstream project https://github.com/machine-drivers/machine, but I could be wrong.

@martininnotec
Copy link

Thanks for discovering the root cause of the issue, I believe the change will need to be in the upstream project https://github.com/machine-drivers/machine, but I could be wrong.

Yes, this code needs to be updated to use the Host-only network instead of the adapter for the new macOS.

https://github.com/machine-drivers/machine/blob/master/drivers/virtualbox/network.go

Has someone raised this with the upstream project?

@jevy-wangfei
Copy link

down grade virtualbox to 6.* would be able to resolve this Host-ony Adapter deprecated issue.

@martininnotec
Copy link

down grade virtualbox to 6.* would be able to resolve this Host-ony Adapter deprecated issue.

I tried the downgrade to Virtualbox 6.1 and the issue still persists when starting minikube.

@d1ck50n
Copy link

d1ck50n commented Dec 9, 2022

Encountered similar issue, and i downgrade virtualbox to older version 6.1 @ https://www.virtualbox.org/wiki/Download_Old_Builds_6_1
I'm able to launch minikube using command : minikube start --driver=virtualbox

@pavgup
Copy link

pavgup commented Dec 18, 2022

Just one more macOS user having no success with minikube because of this problem.

@afbjorklund
Copy link
Collaborator

afbjorklund commented Dec 18, 2022

@martininnotec

Has someone raised this with the upstream project?

The upstream project (docker-machine) is dead, so the feature will have to be developed by minikube...

It is possible to use the machine-driver organisation for hosting the patches, but it's not the upstream.

https://github.com/docker/machine/tree/master/drivers/virtualbox


For newer macOS, it needs to use hostonlynet instead of hostonlyif.

Then the interface will be created by the OS, when the network is used.

This also means that libmachine can't set the IP anymore, it will have to check which one it received.

But the docs say only that it (Host-Only Adapter ) is deprecated, not that it is removed already ?

@afbjorklund
Copy link
Collaborator

afbjorklund commented Dec 18, 2022

This is the tracker issue that @spowelljr created: (github.com/docker/machine is archived and read-only)

So far it (virtualbox2) only carries a small patch for FreeBSD, the rest of the driver is unmodified since v0.16.2

@afbjorklund
Copy link
Collaborator

Unfortunately, I think we will need to look at running alternatives like Docker or Podman until a Virtualbox driver update for Minikube is released.

If you run Docker or Podman with Oracle VirtualBox instead of their "Desktop", you would have the same problem...

You can try another hypervisor driver for Minikube, such as the QEMU driver. Or run minikube in Docker or Podman ?

But the best would be to fix the machine driver.

@spowelljr
Copy link
Member

An upstream fix was merged (machine-drivers/machine#39), I created a PR to update the dependency (#15729). Once the binaries are built I'll link them for anyone experiencing the issue to confirm if it resolves the issue for them, thanks.

@spowelljr
Copy link
Member

If anyone could test these out and confirm whether it fixes the issue.

Intel CPU: https://storage.googleapis.com/minikube-builds/15729/minikube-darwin-amd64
Apple CPU: https://storage.googleapis.com/minikube-builds/15729/minikube-darwin-arm64

@martininnotec
Copy link

machine-drivers/machine#39

Hi @spowelljr - I've installed from the binary and still get the same error, only difference is I now get a warning at the top saying minikube doesn't support Virtualbox - am I doing something wrong?

Screenshot 2023-01-30 at 19 17 47

@afbjorklund
Copy link
Collaborator

afbjorklund commented Jan 30, 2023

@spowelljr

I think you need to set the HostLoopbackReachable in the config, when not using the docker-machine flags.

It is initialized in the NewDriver, but minikube has its own implementation in the minikube driver "registry"...

d.HostLoopbackReachable = true


EDIT: Hmm, minikube does call the virtualbox.NewDriver - so the defaults should be OK, only flags are missing

@martininnotec
Copy link

d.HostLoopbackReachable = true

Thanks, @afbjorklund - I'm not sure where this is configured, however looking at the config.json file on the minikube machine it appears to already have that value set...

Screenshot 2023-01-30 at 19 53 34

@afbjorklund

This comment was marked as outdated.

@afbjorklund
Copy link
Collaborator

afbjorklund commented Jan 30, 2023

Hmm, maybe it would read the defaults. The best would be to look in the log, and see how VBox was started ?

There should be a --natlocalhostreachable1 in the flags.

@afbjorklund
Copy link
Collaborator

afbjorklund commented Jan 30, 2023

Doh! That fix was for a totally different issue.

The network change is still left to do, sorry about the noise.

@martininnotec
Copy link

No worries @afbjorklund - any ETA on a fix for the Host-only Adapter issue?

@fffffreedom
Copy link

No worries @afbjorklund - any ETA on a fix for the Host-only Adapter issue?

same question, anyone helps?

@afbjorklund
Copy link
Collaborator

afbjorklund commented Mar 11, 2023

There is no ETA, I am not sure if anyone is working on the problem at the moment ?

@subhankar-banerjee
Copy link

any idea when this will be resolved ? It was working last year and suddenly I can see few days back it stopped working ..

is that problem started after Mac update ?

@yun14u
Copy link

yun14u commented Apr 28, 2023

This is how I start my minikube,

brew install podman
podman machine init --cpus 2 --memory 2048 --rootful
podman machine start
minikube start --kubernetes-version=1.24.8 --driver=podman --container-runtime=cri-o
minikube status

@k8s-triage-robot
Copy link

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

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

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 25, 2024
@k8s-triage-robot
Copy link

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

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

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

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

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/virtualbox kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. os/macos priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests