minikube: virtualbox: "The host-only adapter we just created is not visible" (needed reboot)

Is this a BUG REPORT or FEATURE REQUEST? Bug report for misleading error message / request for improved docs & error messages

Please provide the following details:

Environment:

Minikube version : v0.33.1

  • OS : macOS Mojave 10.14.2 (18C54)
  • VM Driver : VirtualBox 6.0
  • ISO version : minikube-v0.33.1.iso

What happened:

minikube start
Starting local Kubernetes v1.13.2 cluster...
Starting VM...
E0131 14:39:29.593152   91186 start.go:205] Error starting host: Error starting stopped host: 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.

 Retrying.
E0131 14:39:29.595252   91186 start.go:211] Error starting host:  Error starting stopped host: 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


minikube failed :( exiting with error code 1

What you expected to happen:

  1. minikube to work correctly,
  2. OR, a helpful error message

How to reproduce it (as minimally and precisely as possible):

  1. Completely fresh install of VirtualBox & minikube
  2. Try running minikube start
  3. See the abovementioned error

NOTE: the relevant workaround / fix is to reboot your machine after you have installed VirtualBox. Yes, even on macOS. This is not mentioned in either the docs or the error message - as a user, I had to dig up GitHub issues to find a reference to this.

It would be super useful to have a) better documentation about this, e.g. in readme quickstart b) better error messages

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 7
  • Comments: 17 (5 by maintainers)

Most upvoted comments

Just an addition to the @Walther 's comment for the people who are looking for solution to the problem and end up here… Your VirtualBox might have security issues on MacOS. To solve it you should go to Security&Privacy settings and allow VirtualBox. Allow option only visible after the fresh installation of VirtualBox. If you do not see allow button, try removing the VirtualBox via uninstaller then install it again. After that check the Security&Privacy settings, you should be able to see the allow option.

Update: if like me, you have tried to run minikube start right after a VirtualBox install, without rebooting, the minikube cluster can be in an inconsistent, non-starting state, and not work even after a reboot. But you’ll get a new, different error.

minikube start
Starting local Kubernetes v1.13.2 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Stopping extra container runtimes...
Machine exists, restarting cluster components...
E0131 15:16:18.034551    2345 start.go:382] Error restarting cluster:  restarting kube-proxy: waiting for kube-proxy to be up for configmap update: timed out waiting for the condition


minikube failed :( exiting with error code 1

This above error has been also reported here https://github.com/kubernetes/minikube/issues/3354

However, after running minikube delete and minikube start, I seemed to get into a working state:

minikube delete
minikube start
Deleting local Kubernetes cluster...
Machine deleted.
Starting local Kubernetes v1.13.2 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Stopping extra container runtimes...
Starting cluster components...
Verifying kubelet health ...
Verifying apiserver health ...
Kubectl is now configured to use the cluster.
Loading cached images from config file.


Everything looks great. Please enjoy minikube!

To wrap up:

  1. Install VirtualBox and minikube, don’t reboot
  2. Run minikube start, observe error 1 of “the host-only adapter we just created is not visible”
  3. Reboot the machine, run minikube start, observe error 2 of “timed out waiting for the condition”
  4. Run minikube delete, minikube start, observe minikube working correctly.

So: running minikube start after VirtualBox installation but before rebooting can cause minikube to be in an error state.

I got it work by:

  1. Ensuring Security&Privacy settings were clear.
  2. minikube delete
  3. Restart machine
  4. rm -rf .minikube
  5. minikube start

Perhaps the error message should be:

“Error starting host: The network adapter is not visible. If you just installed VirtualBox, you may need to reboot it before creating a VM.”

Closing as a workaround was found. minikube will now suggest that the user reinstalls VirtualBox and reboots.

I’m getting the same error on my Debian Linux. So, I started with minikube start -v 9 and get this log:

Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg*)" at line 94 of file VBoxManageHostonly.cpp

I fixed that loading the missing kernel modules (as root):

modprobe vboxdrv
modprobe vboxnetadp
modprobe vboxnetflt

No restart or delete required.

Installed Versions:

||/ Name            Version      Architecture
+++-===============-============-============
ii  virtualbox      6.0.4-dfsg-5 amd64       
ii  virtualbox-dkms 6.0.4-dfsg-5 all         
$ minikube version
minikube version: v0.34.1

I got it work by: System Preferences -> Security & Privacy -> Allow -> Then allow the software corporation (in this case Oracle)

I think still have same problem after reboot