Closed danielepo closed 4 years ago
@danielepo what version of minikube do u use?
according to the logs minikube v1.10.1
running minikube version
provides this information
minikube version: v1.10.1
commit: 63ab801ac27e5742ae442ce36dff7877dcccb278
@danielepo do you happen to have done anyhting to your hyperv default swtich ? like deleting the default swtich ? I think the problem is u dont have a default switch.
meanwhile if that is true, minikube should do a better job detecting that and giving a better solution message. do you mind checking that?
Meanwhile have you tried out newest driver Docker Driver with latest version of minikube? you could try minikube delete minikube start --driver=docker
for more information on the docker driver checkout: https://minikube.sigs.k8s.io/docs/drivers/docker/
I get this error on 1.10.1 and 1.10.0 but not on 1.9.2. I'm running on Windows 10 Pro 1909.
The command I use is
minikube.exe start --vm-driver="hyperv" --hyperv-virtual-switch="minikube" --kubernetes-version=1.18.2
("minikube" is the name of the hyper-v switch that has external access.)
Output of the command from 1.10.0 and 1.10.1:
* minikube v1.10.1 on Microsoft Windows 10 Pro 10.0.18363 Build 18363
- MINIKUBE_ACTIVE_DOCKERD=minikube
* Using the hyperv driver based on existing profile
* Starting control plane node minikube in cluster minikube
* Updating the running hyperv "minikube" VM ...
* Preparing Kubernetes v1.18.2 on Docker 19.03.5 ...
E0518 17:20:09.157958 2988 start.go:95] Unable to get host IP: ip for interface (minikube): Error finding IPV4 address for vEthernet (minikube)
*
X failed to start node: startup failed: Failed to setup kubeconfig: ip for interface (minikube): Error finding IPV4 address for vEthernet (minikube)
*
* minikube is exiting due to an error. If the above message is not useful, open an issue:
- https://github.com/kubernetes/minikube/issues/new/choose
Output of the command from 1.9.2:
* minikube v1.9.2 on Microsoft Windows 10 Pro 10.0.18363 Build 18363
- MINIKUBE_ACTIVE_DOCKERD=minikube
* Using the hyperv driver based on existing profile
* Starting control plane node m01 in cluster minikube
* Restarting existing hyperv VM for "minikube" ...
* Preparing Kubernetes v1.18.2 on Docker 19.03.5 ...
* Enabling addons: default-storageclass, storage-provisioner
* Done! kubectl is now configured to use "minikube"
@robrich not sure whats the cause of this issue, but in newest versions of minikube we no longer need to specifcy the switch and it auto-detects, do you mind trying without that ?
@danielepo @robrich Meanwhile have you tried out newest driver Docker Driver with latest version of minikube? you could try minikube delete minikube start --driver=docker
for more information on the docker driver checkout: https://minikube.sigs.k8s.io/docs/drivers/docker/
I also recommend using the latest minikube (not relevent to your issue but we had some other improvements)
I did minikube delete
, upgraded to 1.11.0, minikube start ...
, and it started right up. It still wasn't able to correctly detect my switch, but restarting and passing the arg worked like a charm.
--driver=docker
seems interesting but I'm not sure I understand the benefit. If I wanted a k8s cluster on Docker, I'd use Docker Desktop and turn on Kubernetes mode. What does minikube --driver=docker
yield that Docker Desktop doesn't? (Aside from choosing my own k8s version.) What don't I understand yet?
Hi, Medyagh's advice does work, but I'd quite like to know why doing it with hyper-v doesn't work (when it did yesterday on the exact same machine). Also, with hyper-V, I had a handy way of seeing the status of my minikube vm, I can't see a GUI way to look at it in Docker....(I am new to this). Big thanks to Medyagh though , been tearing my hair out all day.
@medyagh I ran into the same issue. In my case I am trying to start minikube from inside the Virtual Machine. Therefore my network interfaces names were as follows:
PS C:\WINDOWS\system32> netsh interface ipv4 show interface
Idx Met MTU State Name
--- ---------- ---------- ------------ ---------------------------
1 75 4294967295 connected Loopback Pseudo-Interface 1
14 15 1500 connected Ethernet 7
16 5000 1500 connected vEthernet (Default Switch) 2
As you can see the name is vEthernet (Default Switch) 2
and not vEthernet (Default Switch)
which is what the implementation at https://github.com/kubernetes/minikube/blob/20179ef8ee3253043637132862970095132557df/pkg/minikube/cluster/ip.go#L56 tries to do.
I am not sure if there is better way to find the interface name but I think better approach than current implementation would be to do prefix match by looping over all interface names as done in stackoverflow link mentioned in https://github.com/kubernetes/minikube/blob/20179ef8ee3253043637132862970095132557df/pkg/minikube/cluster/ip.go#L134
The interface name cannot be renamed as the host uses the same name so its hard to match this hard coded pattern in code.
I agree that we should do a better job of finding the interface name. It should be as easy as calling net.Interfaces
, looping through them and prefix matching on the names.
Help wanted!
This is occuring with other folks in my team. I would have helped out with this but I have zero experience in 'go' to provide help with this quickly without ramping up. Looking forward to help on this.
@sammym1982 I have Hyper-V switch with name "Wan" and local interface vEthernet (Default Switch). After rename vEthernet (Default Switch) to vEthernet (Wan) all works good +_+
Steps to reproduce the issue:
minikube start --driver=hyperv
the command will error outUnable to get host IP: ip for interface
running the command
minikube status
will returnFull output of failed command:
Optional: Full output of
minikube logs
command: