minikube version: v0.20.0
Environment:
OS: Linux 4.11.9-1-ARCH
VM Driver: virtualbox 5.1.24 r117012
What happened:
Updated to virtualbox 5.1.24 r117012 then did
"minikube create" - create a new minikube vm in virtualbox but "kubectl get nodes" times-out
More detail
"VBoxManage list hostonlyifs"
Name: vboxnet0
GUID: 786f6276-656e-4074-8000-0a0027000000
DHCP: Disabled
IPAddress: 192.168.99.1
NetworkMask: 255.255.255.0
IPV6Address: fe80:0000:0000:0000:0800:27ff:fe00:0000
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:00
MediumType: Ethernet
Status: down
VBoxNetworkName: HostInterfaceNetworking-vboxnet0
As indicated above the host vboxnet0 is down.
How to reproduce it:
minikube delete and reboot
minikube create creates vboxnet0 but it's in down status
Workaround:
To get around the problem - $ sudo ip link set dev vboxnet0 up
I wasted an hour trying to figure this out. Figured out the workaround on my own. :|
Thank you very much for the workaround. It worked for me too.
For search engine reasons I'm going to add the error message that I was seeing so people can find this issue and workaround:
"Unable to connect to the server: dial tcp 192.168.99.100:8443: getsockopt: no route to host"
and
"Unable to connect to the server: dial tcp 192.168.99.100:8443: i/o timeout"
Thank you for the workaround!
I wasted also a lot of time ...
seems it's a common issue after recent upgrade of virtualbox on arch: have the same problem with Vagrant created boxes
@deanjameseverett Thank you very much. My development process got stuck right after the update !
Thank you so much i was going mad!
Downgrading to VirtualBox 5.1.22 fixes the issue for me.
Thank you for the workaround.
As we debugged on slack - a recent upgrade to virtualbox sets the created host only interfaces down.
Here is the code responsible for setting up the host-only adapter in docker/machine
https://github.com/docker/machine/blob/769e2cf79a18c7e1ffc1650fe83e7d197805bfd7/drivers/virtualbox/network.go#L182-L214
We check for the existence of the interface, but don't check its state. As far as I could tell, there isn't a VBoxManage command to set the host only interface up/down, only commands to create/remove. Since we don't have root privileges in this case, we should check its state and just delete/recreate if its down. (Unless someone knows how to do it through a VBox- binary, I couldn't find anything in the documentation)
I encountered this problem too. Workaround fixes it.
Downgrading to virtualbox 5.0 under ubuntu Xenial doesn't work around this.
I think this is the upstream bug: https://www.virtualbox.org/ticket/16911
Closing this, as its an upstream bug that looks like it got fixed.
Most helpful comment
Thank you very much for the workaround. It worked for me too.
For search engine reasons I'm going to add the error message that I was seeing so people can find this issue and workaround:
"Unable to connect to the server: dial tcp 192.168.99.100:8443: getsockopt: no route to host"
and
"Unable to connect to the server: dial tcp 192.168.99.100:8443: i/o timeout"