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: "The host-only adapter we just created is not visible" (needed reboot) #3614

Closed
Walther opened this issue Jan 31, 2019 · 17 comments
Labels
cause/vm-driver When a VM driver bug causes the failure (not nested) help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/backlog Higher priority than priority/awaiting-more-evidence. r/2019q2 Issue was last reviewed 2019q2

Comments

@Walther
Copy link

Walther commented Jan 31, 2019

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

@Walther
Copy link
Author

Walther commented Feb 1, 2019

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 #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.

@tstromberg tstromberg added kind/bug Categorizes issue or PR as related to a bug. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Feb 5, 2019
@tstromberg
Copy link
Contributor

Agreed. We should update the error message to cover this much more likely scenario.

@balopat balopat added the kind/documentation Categorizes issue or PR as related to documentation. label Feb 5, 2019
@tstromberg tstromberg added cause/vm-driver When a VM driver bug causes the failure (not nested) and removed kind/documentation Categorizes issue or PR as related to documentation. labels Feb 5, 2019
@balopat balopat added the kind/documentation Categorizes issue or PR as related to documentation. label Feb 6, 2019
@Zyqsempai
Copy link
Contributor

So, from my point of view, the first message is pretty descriptive;)
Which messages do you expect to see?
I can take care of it by the way))

@seckinozden
Copy link

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.

@tstromberg
Copy link
Contributor

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."

@tstromberg tstromberg changed the title VirtualBox & minikube: misleading error message "The host-only adapter we just created is not visible" virtualbox: "The host-only adapter we just created is not visible" (needed reboot) Feb 12, 2019
@tstromberg tstromberg added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Feb 12, 2019
@RA489
Copy link

RA489 commented Feb 18, 2019

@tstromberg Is it still open? i would like to take it.

@rodolfo3
Copy link

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

@c1tt1
Copy link

c1tt1 commented Mar 6, 2019

I'm having the same problems with minikube, I'm on

  • macos mojave 10.14.3 (18D109)
  • minikube version: v0.34.1
  • VirtualBox 6.0.4

@tstromberg
Copy link
Contributor

@cllty - did a reboot fix it?

@hendisantika
Copy link

So, Is it not solved @tstromberg ?
This is same like my sympton.

@hkiang01
Copy link

Same problem with:

  • macOS Mojave Version 10.14.5
  • VirtualBox Version 6.0.8 r130520 (Qt5.6.3)
  • minikube version: v1.0.1

Despite restarts and ensuring Security&Privacy settings were clear, I still get the same error. I do not observe the above [timeout]

Here's my output from minikube start -v 9

$ minikube start -v 9
😄  minikube v1.0.1 on darwin (amd64)
🤹  Downloading Kubernetes v1.14.1 images in the background ...
💡  Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one.
COMMAND: /usr/local/bin/VBoxManage showvminfo minikube --machinereadable
STDOUT:
{
name="minikube"
groups="/"
ostype="Linux 2.6 / 3.x / 4.x (64-bit)"
UUID="9f06ee79-d1ee-4e9b-b734-26b9c1aba221"
CfgFile="/Users/harrison/.minikube/machines/minikube/minikube/minikube.vbox"
SnapFldr="/Users/harrison/.minikube/machines/minikube/minikube/Snapshots"
LogFldr="/Users/harrison/.minikube/machines/minikube/minikube/Logs"
hardwareuuid="9f06ee79-d1ee-4e9b-b734-26b9c1aba221"
memory=2048
pagefusion="off"
vram=8
cpuexecutioncap=100
hpet="on"
cpu-profile="host"
chipset="piix3"
firmware="BIOS"
cpus=2
pae="on"
longmode="on"
triplefaultreset="off"
apic="on"
x2apic="off"
nested-hw-virt="off"
cpuid-portability-level=0
bootmenu="disabled"
boot1="dvd"
boot2="dvd"
boot3="disk"
boot4="none"
acpi="on"
ioapic="on"
biosapic="apic"
biossystemtimeoffset=0
rtcuseutc="on"
hwvirtex="on"
nestedpaging="on"
largepages="on"
vtxvpid="on"
vtxux="on"
paravirtprovider="default"
effparavirtprovider="kvm"
VMState="poweroff"
VMStateChangeTime="2019-05-16T17:11:28.000000000"
monitorcount=1
accelerate3d="off"
accelerate2dvideo="off"
teleporterenabled="off"
teleporterport=0
teleporteraddress=""
teleporterpassword=""
tracing-enabled="off"
tracing-allow-vm-access="off"
tracing-config=""
autostart-enabled="off"
autostart-delay=0
defaultfrontend=""
storagecontrollername0="SATA"
storagecontrollertype0="IntelAhci"
storagecontrollerinstance0="0"
storagecontrollermaxportcount0="30"
storagecontrollerportcount0="30"
storagecontrollerbootable0="on"
"SATA-0-0"="/Users/harrison/.minikube/machines/minikube/boot2docker.iso"
"SATA-ImageUUID-0-0"="72e56e62-1428-4485-a68f-ee76ddcca8f7"
"SATA-tempeject"="off"
"SATA-IsEjected"="off"
"SATA-1-0"="/Users/harrison/.minikube/machines/minikube/disk.vmdk"
"SATA-ImageUUID-1-0"="637409fe-f3e0-401b-b74b-2868c5e14282"
"SATA-2-0"="none"
"SATA-3-0"="none"
"SATA-4-0"="none"
"SATA-5-0"="none"
"SATA-6-0"="none"
"SATA-7-0"="none"
"SATA-8-0"="none"
"SATA-9-0"="none"
"SATA-10-0"="none"
"SATA-11-0"="none"
"SATA-12-0"="none"
"SATA-13-0"="none"
"SATA-14-0"="none"
"SATA-15-0"="none"
"SATA-16-0"="none"
"SATA-17-0"="none"
"SATA-18-0"="none"
"SATA-19-0"="none"
"SATA-20-0"="none"
"SATA-21-0"="none"
"SATA-22-0"="none"
"SATA-23-0"="none"
"SATA-24-0"="none"
"SATA-25-0"="none"
"SATA-26-0"="none"
"SATA-27-0"="none"
"SATA-28-0"="none"
"SATA-29-0"="none"
natnet1="nat"
macaddress1="08002730125A"
cableconnected1="on"
nic1="nat"
nictype1="virtio"
nicspeed1="0"
mtu="0"
sockSnd="64"
sockRcv="64"
tcpWndSnd="64"
tcpWndRcv="64"
nic2="none"
nic3="none"
nic4="none"
nic5="none"
nic6="none"
nic7="none"
nic8="none"
hidpointing="ps2mouse"
hidkeyboard="ps2kbd"
uart1="off"
uart2="off"
uart3="off"
uart4="off"
lpt1="off"
lpt2="off"
audio="coreaudio"
audio_in="off"
audio_out="off"
clipboard="disabled"
draganddrop="disabled"
vrde="off"
usb="off"
ehci="off"
xhci="off"
SharedFolderNameMachineMapping1="Users"
SharedFolderPathMachineMapping1="/Users"
videocap="off"
videocapaudio="off"
capturescreens="0"
capturefilename="/Users/harrison/.minikube/machines/minikube/minikube/minikube.webm"
captureres="1024x768"
capturevideorate=512
capturevideofps=25
captureopts=""
GuestMemoryBalloon=0
}
STDERR:
{
}
🔄  Restarting existing virtualbox VM for "minikube" ...
COMMAND: /usr/local/bin/VBoxManage showvminfo minikube --machinereadable
STDOUT:
{
name="minikube"
groups="/"
ostype="Linux 2.6 / 3.x / 4.x (64-bit)"
UUID="9f06ee79-d1ee-4e9b-b734-26b9c1aba221"
CfgFile="/Users/harrison/.minikube/machines/minikube/minikube/minikube.vbox"
SnapFldr="/Users/harrison/.minikube/machines/minikube/minikube/Snapshots"
LogFldr="/Users/harrison/.minikube/machines/minikube/minikube/Logs"
hardwareuuid="9f06ee79-d1ee-4e9b-b734-26b9c1aba221"
memory=2048
pagefusion="off"
vram=8
cpuexecutioncap=100
hpet="on"
cpu-profile="host"
chipset="piix3"
firmware="BIOS"
cpus=2
pae="on"
longmode="on"
triplefaultreset="off"
apic="on"
x2apic="off"
nested-hw-virt="off"
cpuid-portability-level=0
bootmenu="disabled"
boot1="dvd"
boot2="dvd"
boot3="disk"
boot4="none"
acpi="on"
ioapic="on"
biosapic="apic"
biossystemtimeoffset=0
rtcuseutc="on"
hwvirtex="on"
nestedpaging="on"
largepages="on"
vtxvpid="on"
vtxux="on"
paravirtprovider="default"
effparavirtprovider="kvm"
VMState="poweroff"
VMStateChangeTime="2019-05-16T17:11:28.000000000"
monitorcount=1
accelerate3d="off"
accelerate2dvideo="off"
teleporterenabled="off"
teleporterport=0
teleporteraddress=""
teleporterpassword=""
tracing-enabled="off"
tracing-allow-vm-access="off"
tracing-config=""
autostart-enabled="off"
autostart-delay=0
defaultfrontend=""
storagecontrollername0="SATA"
storagecontrollertype0="IntelAhci"
storagecontrollerinstance0="0"
storagecontrollermaxportcount0="30"
storagecontrollerportcount0="30"
storagecontrollerbootable0="on"
"SATA-0-0"="/Users/harrison/.minikube/machines/minikube/boot2docker.iso"
"SATA-ImageUUID-0-0"="72e56e62-1428-4485-a68f-ee76ddcca8f7"
"SATA-tempeject"="off"
"SATA-IsEjected"="off"
"SATA-1-0"="/Users/harrison/.minikube/machines/minikube/disk.vmdk"
"SATA-ImageUUID-1-0"="637409fe-f3e0-401b-b74b-2868c5e14282"
"SATA-2-0"="none"
"SATA-3-0"="none"
"SATA-4-0"="none"
"SATA-5-0"="none"
"SATA-6-0"="none"
"SATA-7-0"="none"
"SATA-8-0"="none"
"SATA-9-0"="none"
"SATA-10-0"="none"
"SATA-11-0"="none"
"SATA-12-0"="none"
"SATA-13-0"="none"
"SATA-14-0"="none"
"SATA-15-0"="none"
"SATA-16-0"="none"
"SATA-17-0"="none"
"SATA-18-0"="none"
"SATA-19-0"="none"
"SATA-20-0"="none"
"SATA-21-0"="none"
"SATA-22-0"="none"
"SATA-23-0"="none"
"SATA-24-0"="none"
"SATA-25-0"="none"
"SATA-26-0"="none"
"SATA-27-0"="none"
"SATA-28-0"="none"
"SATA-29-0"="none"
natnet1="nat"
macaddress1="08002730125A"
cableconnected1="on"
nic1="nat"
nictype1="virtio"
nicspeed1="0"
mtu="0"
sockSnd="64"
sockRcv="64"
tcpWndSnd="64"
tcpWndRcv="64"
nic2="none"
nic3="none"
nic4="none"
nic5="none"
nic6="none"
nic7="none"
nic8="none"
hidpointing="ps2mouse"
hidkeyboard="ps2kbd"
uart1="off"
uart2="off"
uart3="off"
uart4="off"
lpt1="off"
lpt2="off"
audio="coreaudio"
audio_in="off"
audio_out="off"
clipboard="disabled"
draganddrop="disabled"
vrde="off"
usb="off"
ehci="off"
xhci="off"
SharedFolderNameMachineMapping1="Users"
SharedFolderPathMachineMapping1="/Users"
videocap="off"
videocapaudio="off"
capturescreens="0"
capturefilename="/Users/harrison/.minikube/machines/minikube/minikube/minikube.webm"
captureres="1024x768"
capturevideorate=512
capturevideofps=25
captureopts=""
GuestMemoryBalloon=0
}
STDERR:
{
}
Check network to re-create if needed...
COMMAND: /usr/local/bin/VBoxManage list hostonlyifs
STDOUT:
{
}
STDERR:
{
}
Searching for hostonly interface for IPv4: 192.168.99.1 and Mask: ffffff00
Not found
COMMAND: /usr/local/bin/VBoxManage hostonlyif create
STDOUT:
{
}
STDERR:
{
0%...
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
}
Creating a new host-only adapter produced an error: /usr/local/bin/VBoxManage hostonlyif create failed:
0%...
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

This is a known VirtualBox bug. Let's try to recover anyway...
COMMAND: /usr/local/bin/VBoxManage list hostonlyifs
STDOUT:
{
}
STDERR:
{
}
COMMAND: /usr/local/bin/VBoxManage list hostonlyifs
STDOUT:
{
}
STDERR:
{
}
COMMAND: /usr/local/bin/VBoxManage list hostonlyifs
STDOUT:
{
}
STDERR:
{
}
COMMAND: /usr/local/bin/VBoxManage list hostonlyifs
STDOUT:
{
}
STDERR:
{
}
COMMAND: /usr/local/bin/VBoxManage list hostonlyifs
STDOUT:
{
}
STDERR:
{
}
COMMAND: /usr/local/bin/VBoxManage list hostonlyifs
STDOUT:
{
}
STDERR:
{
}
COMMAND: /usr/local/bin/VBoxManage list hostonlyifs
STDOUT:
{
}
STDERR:
{
}
COMMAND: /usr/local/bin/VBoxManage list hostonlyifs
STDOUT:
{
}
STDERR:
{
}
COMMAND: /usr/local/bin/VBoxManage list hostonlyifs
STDOUT:
{
}
STDERR:
{
}
COMMAND: /usr/local/bin/VBoxManage list hostonlyifs
STDOUT:
{
}
STDERR:
{
}

💣  Unable to start VM: start: 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

😿  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉  https://github.com/kubernetes/minikube/issues/new

@tstromberg tstromberg added r/2019q2 Issue was last reviewed 2019q2 and removed good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/documentation Categorizes issue or PR as related to documentation. labels May 22, 2019
@kfsleung
Copy link

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

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/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 Aug 24, 2019
@tstromberg
Copy link
Contributor

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

@nealYangVic
Copy link

I think still have same problem after reboot

@philbrookes
Copy link

philbrookes commented Sep 9, 2020

This problem can also occur after upgrading to kernel 5.8.x, I switched back to 5.7.x and the problem has gone away.

More information is available here: https://www.virtualbox.org/ticket/19644

I found this was the issue after running sudo /sbin/vboxconfig and analyzing the output in: /var/log/vbox-setup.log.

@lee-count-from-zero
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cause/vm-driver When a VM driver bug causes the failure (not nested) help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/backlog Higher priority than priority/awaiting-more-evidence. r/2019q2 Issue was last reviewed 2019q2
Projects
None yet
Development

No branches or pull requests