minikube: 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

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Please provide the following details:

Environment:

Minikube version (use minikube version):

  • OS (e.g. from /etc/os-release):
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName):
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION):
  • Install tools:
  • Others: The above can be generated in one go with the following commands (can be copied and pasted directly into your terminal):
echo "";
echo "OS:";
cat /etc/os-release
echo "";
echo "VM driver":
grep DriverName ~/.minikube/machines/minikube/config.json
echo "";
echo "ISO version";
grep -i ISO ~/.minikube/machines/minikube/config.json

OS:
cat: /etc/os-release: No such file or directory

VM driver:
    "DriverName": "virtualbox",

ISO version
        "Boot2DockerURL": "file:///Users/admin/.minikube/cache/iso/minikube-v0.23.6.iso",

What happened:

E0121 01:52:54.738520   23608 start.go:156] Error starting host:  Error creating host: Error executing step: Creating VM.
: 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

What you expected to happen:

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

Output of minikube logs (if applicable):

F0121 01:59:40.651984   23877 logs.go:50] Error getting cluster bootstrapper: getting localkube bootstrapper: getting ssh client: Error dialing tcp via ssh client: dial tcp 127.0.0.1:22: getsockopt: connection refused

Anything else do we need to know:

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 3
  • Comments: 37 (1 by maintainers)

Most upvoted comments

I reinstalled the same version of VirtualBox, and it worked. I think the reason was because when I firist installed VirtualBox, it said it had failed because the OS blocked some installation thing. So I went to System Preferences, Security, and there was a message something like “The installation from Oracle was blocked”. I approved it, and thought that would be that.

But it didn’t work. However, as I say I re-installed it and I guess the OS remembered that I approved installation so it worked without a problem this time.

I had given up, fail forever to install kubernetes, maybe because i am in china

I had this problem running on Arch Linux. It was caused by the virtualbox kernel modules for network not being loaded correctly after a new installation of virtualbox. After a reboot the correct kernel modules were loaded and Minikube ran as normal.

The required network modules are:

% lsmod | grep vbox
vboxnetflt             32768  0
vboxnetadp             28672  0
vboxpci                28672  0
vboxdrv               483328  3 vboxnetadp,vboxnetflt,vboxpci

I did not have to reinstall virtualbox to fix this problem – I just needed to reboot.

sudo modprobe vboxnetadp

MacOS Solution

Run the following shell(Root is necessary)

#!/bin/bash

unload() {
        if [ `ps -ef | grep -c VirtualBox$` -ne 0 ]
        then
                echo "VirtualBox still seems to be running. Please investigate!!"
                exit 1;
        elif [ `ps -ef | grep -c [V]ir` -gt 0 ]
        then
                echo "Stopping running processes before unloading Kernel Extensions"
                ps -ef | grep [V]ir | awk '{print $2}' | xargs kill
        fi
        echo "Unloading Kernel Extensions"
        kextstat | grep "org.virtualbox.kext.VBoxUSB" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxUSB
        kextstat | grep "org.virtualbox.kext.VBoxNetFlt" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxNetFlt
        kextstat | grep "org.virtualbox.kext.VBoxNetAdp" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxNetAdp
        kextstat | grep "org.virtualbox.kext.VBoxDrv" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxDrv
}

load() {
        echo "Loading Kernel Extentions"
        sudo kextload "/Library/Application Support/VirtualBox/VBoxDrv.kext" -r "/Library/Application Support/VirtualBox/"
        sudo kextload "/Library/Application Support/VirtualBox/VBoxNetAdp.kext" -r "/Library/Application Support/VirtualBox/"
        sudo kextload "/Library/Application Support/VirtualBox/VBoxNetFlt.kext" -r "/Library/Application Support/VirtualBox/"
        sudo kextload "/Library/Application Support/VirtualBox/VBoxUSB.kext" -r "/Library/Application Support/VirtualBox/"
}

case "$1" in
        unload|remove)
                unload
                ;;
        load)
                load
                ;;
        *|reload)
                unload
                load
                ;;
esac

MacOS open System Preferences → Security & Privacy → General image Click Allow

Last, rerun brew cask reinstall virtualbox

Perfectly resolved for me

I experienced on Windows 10 that you should restart after installing VirtualBox.

Minikube and Ubuntu 16.04 have been a horrible experience. I have reinstalled virtualbox multiple times and tried multiple different versions. This is really disappointing.

On Ubuntu Linux, there were a few things I needed to check with VirtualBox:

  1. First, ensure the latest kernel modules have been built
sudo vboxconfig

If you are using SecureBoot, ensure these modules have been signed as well (you’ll have set up a process for this if you have used VirtualBox in the past)

  1. Ensure the relevant vbox modules are loaded into the kernel
sudo modprobe vboxdrv vboxnetadp vboxnetflt vboxpci

You can check their output by tailing dmesg, or list them out by running ls /lib/modules/`uname -r`/misc 3. Lastly ensure that you have an VirtualBox interface that can be used as a host-only network. This can be done in the UI by going to File->Host Network Manager (and clicking Create if one isn’t available) or by running VBoxManage hostonlyif create to create a new one

Ok so on Mac I had the same issue, here’s my flow (now it’s fixed):

INSTALLATION ISSUE

  1. Download VirtualBox, start installation
  2. Installation failed, some security thing was not accepted
  3. Opened settings as suggested, accepted this security thing
  4. Closed the installer and assumed it’s all good now <-- ISSUE
  5. Downloaded and installed all Kubernetes stuff
  6. Tried to run minikube start, failure as described in this ticket

RE-INSTALLATION ATTEMPTS

  1. Move VirtualBox from Applications to Trash <-- NO, DOESN’T WORK
  2. Reinstall VirtualBox (installation failure)
  3. Open VirtualBox installer .dmg, run the uninstaller tool
  4. Reinstall VirtualBox (installation failure) <-- NO, DOESN’T WORK

SOLUTION, AFTER EVERYTHING ELSE FAILED…

  1. Open VirtualBox installer .dmg, run the uninstaller tool
  2. RESTART OS
  3. Open VirtualBox installer .dmg, run the installer again (security thing is now accepted)
  4. RESTART OS
  5. Run minikube start

So trial and error. Should be fixed by Oracle I think, this installer fails by default… but hey, they must be really busy with other stuff…

Thanks, that was it @alienscience. Also I needed the virtualbox-host-modules-arch instead of the default one suggested when installing virtualbox.

I didn’t reboot but just loaded the kernel modules manually.

It looks to me like this error message is somewhat misleading. For me, it wasn’t really anything to do with a virtualbox known bug or a version higher that 5.0.12. However, it was an issue with how virtualbox was installed. If you get this error, first try running minikube VM manually under virtualbox. More applicable errors are shown there.

I ended up removing and reinstalling virtualbox with the correct kernel modules. I then needed to manually delete the previously created minikube VM in virualbox followed by a minikube delete so that minikube would create a valid VM.

Now at least minikube start completes without errors.

I had same issue on OSX, and struggled a lot until I tried to install VirtualBox with Cask which printed the following:

virtualbox requires a kernel extension to work.
If the installation fails, retry after you enable it in:
  System Preferences → Security & Privacy → General

For more information, refer to vendor documentation or this Apple Technical Note:
  https://developer.apple.com/library/content/technotes/tn2459/_index.html

Allowing Orance Inc. developer in System Preferences → Security & Privacy → General fixed the problem.

Uninstalling und reinstalling with the exact installer works. If you use the windows uninstall tools I had no luck.

Try to reinstall virtualbox with the same installer or run the networking setup tool. The host-only network (default) needs to exist as this is needed for initial and ssh communication.

Rebooting the system after installing VirtualBox worked for me (MacOS Mojave 10.14.3)

Clear reinstall of VirtualBox helped me. Mac OS High Sierra 10.13.4 Beta4, minikube v0.25.0. VirtualBox v5.2.8 r121009

I just used the kvm2 hypervisor, which works very well.

On Mar 11, 2018 9:59 AM, “Rikki Rockett” notifications@github.com wrote:

I’ve got the same issue. Did anyone find a solution for this?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kubernetes/minikube/issues/2439#issuecomment-372099875, or mute the thread https://github.com/notifications/unsubscribe-auth/AA6-gvJdEg9S88YKWdykfcDZYBDyHoMcks5tdOeMgaJpZM4RlhpK .

I’m getting this too, on NixOS 17.09

  • minikube v0.21.0
  • virtualbox 5.1.32
  • kubectl 1.7.9

The version constraint in the error message is clearly incorrect, since I’m on VirtualBox 5.1.32 and still getting this

[ben@lithium:~/work]$ cat devkube.nix 
{ pkgs ? import <nixpkgs> {} }:

with pkgs;

stdenv.mkDerivation {
  name = "kube-test";
  buildInputs = [
    kubernetes
    minikube
    virtualboxHeadless
  ];
}

[ben@lithium:~/work]$ nix-shell devkube.nix 
# ...downloads dependencies...

[nix-shell:~/work]$ VBoxManage -v
5.1.32r120294

[nix-shell:~/work]$ minikube version
minikube version: v0.21.0

[nix-shell:~/work]$ kubectl version
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.9+7f63532e4ff4f", GitCommit:"7f63532e4ff4fbc7cacd96f6a95b50a49a2dc41b", GitTreeState:"not a git tree", BuildDate:"2018-01-31T16:22:55Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
The connection to the server localhost:8080 was refused - did you specify the right host or port?

[nix-shell:~/work]$ minikube start
Starting local Kubernetes v1.7.0+6f65c4383 cluster...
Starting VM...
E0213 13:49:14.514465   16476 start.go:129] 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.
E0213 13:49:14.514584   16476 start.go:135] 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