Minikube: Unable to start minikube - Exiting due to DRV_NO_IP: - minikube

I am trying to create the minikube cluster, but It always fails.
Any suggestions are very welcome:
C:\WINDOWS\system32>minikube start --driver=vmware
minikube v1.16.0 on Microsoft Windows 10 Home 10.0.19042 Build 19042
Using the vmware driver based on user configuration
Starting control plane node minikube in cluster minikube
Creating vmware VM (CPUs=2, Memory=4000MB, Disk=20000MB) ...
Deleting "minikube" in vmware ...
! StartHost failed, but will try again: creating host: create: Error creating machine: Error in driver during machine creation: Machine didn't return an IP after 120 seconds, aborting
Creating vmware VM (CPUs=2, Memory=4000MB, Disk=20000MB) ...
Failed to start vmware VM. Running "minikube delete" may fix it: creating host: create: Error creating machine: Error in driver during machine creation: Machine didn't return an IP after 120 seconds, aborting
X Exiting due to DRV_NO_IP: Failed to start host: creating host: create: Error creating machine: Error in driver during machine creation: Machine didn't return an IP after 120 seconds, aborting
Suggestion: Check your firewall rules for interference, and run 'virt-host-validate' to check for KVM configuration issues. If you are running minikube within a VM, consider using --driver=none
Documentation: https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/
Related issues:
https://github.com/kubernetes/minikube/issues/4249
https://github.com/kubernetes/minikube/issues/3566

I had a similar error when setting up Minikube on Mac OS.
When I run the command minikube start I get the error below:
πŸ˜„ minikube v1.22.0 on Darwin 11.4
✨ Using the vmware driver based on existing profile
πŸ‘ Starting control plane node minikube in cluster minikube
πŸƒ Updating the running vmware "minikube" VM ...
🀦 StartHost failed, but will try again: provision: IP not found for MAC 00:0c:29:41:e9:b9 in DHCP leases
πŸƒ Updating the running vmware "minikube" VM ...
😿 Failed to start vmware VM. Running "minikube delete" may fix it: provision: IP not found for MAC 00:0c:29:41:e9:b9 in DHCP leases
❌ Exiting due to GUEST_PROVISION: Failed to start host: provision: IP not found for MAC 00:0c:29:41:e9:b9 in DHCP leases
The issue was caused by an interruption when I was creating the VMWare VM for Minikube.
I tried fixing it by deleting the existing minikube vm and creating another one using:
minikube delete
minikube start
But then I ran into another issue this time:
Exiting due to DRV_NO_IP: Failed to start host: creating host: create: Error creating machine: Error in driver during machine creation: Machine didn't return an IP after 120 seconds, aborting.
Here's how I fixed it
After multiple research, it's just best to set up minikube with docker driver which will save you all this hassle.
For Mac OS:
If you already have docker installed or docker-compose simply uninstall it using:
brew uninstall docker
brew uninstall docker-compose
Next, install Docker desktop. This will install Docker/Docker Desktop, Docker-compose and other dependencies using:
brew install --cask docker
Next, start the docker engine by opening the Docker application. Afterwhich you can confirm the docker version using:
docker --version
Finally, setup minikube using docker driver:
minikube start --driver=docker

Related

minikube not starting once my laptop connects to a VPN

When I am not connected to the VPN, minikube is starting as expected:
PS C:\Windows\system32> minikube start
* minikube v1.9.2 on Microsoft Windows 10 Enterprise 10.0.18363 Build 18363
* Using the hyperv driver based on existing profile
* Starting control plane node m01 in cluster minikube
* Updating the running hyperv "minikube" VM ...
* Preparing Kubernetes v1.18.0 on Docker 19.03.8 ...
E0408 01:00:31.223159 17528 kubeadm.go:331] Overriding stale ClientConfig host https://192.168.137.249:8443 with https://172.17.118.34:8443
* Enabling addons: default-storageclass, storage-provisioner
* Done! kubectl is now configured to use "minikube"
Once I am connectong to the VPN antri triing to start the minikube, it fails with an error:
PS C:\Windows\system32> minikube start
* minikube v1.9.2 on Microsoft Windows 10 Enterprise 10.0.18363 Build 18363
* Using the hyperv driver based on existing profile
* Starting control plane node m01 in cluster minikube
* Updating the running hyperv "minikube" VM ...
! StartHost failed, but will try again: provision: IP not found
* Updating the running hyperv "minikube" VM ...
*
X Failed to start hyperv VM. "minikube start" may fix it.: provision: IP not found
*
* 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
I was facing a similar issue while running the following command:
minikube start --vm-driver="hyperv" --hyperv-virtual-switch="minikube"
Then I went through some github and stackoverflow threads and was able to resolve my issue by running following command:
minikube delete
minikube start --vm-driver="hyperv"
In my case, passing 'hyperv-virtual-switch' argument was causing the issue.
I would suggest you to check if your virtual switch is configured with your vpn network or not.
If not, then you can perform the following steps to do so:
Go to network and sharing center settings of windows:
Select your network and open the properties window for it. Go to the "Sharing" tab and allow your configured virtual switch over there.

Error Starting Minikube on Ubuntu VM VirutalBox

I do have an Ubuntu VM in VirtualBox on Windows 10. If i follow the instructions to install Minikube I get a start error:
> minikube start &
[1] 4297
vagrant#ubuntu-xenial:~$ o minikube v0.35.0 on linux (amd64)
> Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
# Downloading Minikube ISO ...
184.42 MB / 184.42 MB [============================================] 100.00%
0s
! Unable to start VM: create: precreate: VBoxManage not found. Make sure
VirtualBox is installed and VBoxManage is in the path
Does it mean i need to install VirtualBox in the Ubuntu VM too? Kind of VB inside VB..
thanks
I'd recommend to install Minikube on your host OS (Windows) and use the already installed Virtual box as a hypervisor provider.
If for any reason you want to launch it on Ubuntu VM, there are two options:
I. Minikube supports a --vm-driver=none option that runs the Kubernetes components on the host and not in a VM. Using this driver requires Docker and a Linux environment, but not a hypervisor. In this case you have to provide an address to you local API server
`minikube start --vm-driver=none --apiserver-ips 127.0.0.1 --apiserver-name localhost`
And then go and edit ~/.kube/config, replacing the server IP that was
detected from the main network interface with "localhost". For example:
apiVersion: v1
clusters:
- cluster:
certificate-authority-data:/home/asuh/.minikube/ca.crt
server: https://localhost:8443
name: minikube
II. Install VM Ware on Windows and run Ubuntu within installed Virtualbox
and and enabled VT-X/AMD-v in outer VM.
Regarding the error you have at the moment:
However now i get another error like: /usr/local/bin/minikube: cannot
execute binary file
Make sure you have installed a proper version of Minikube. For your Ubuntu VM it should be
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
&& chmod +x minikube
It is not recommended to use VM inside VM to run minikube. Check this answer. Try to run minikube with no vm drivers.
minikube start --vm-driver=none
I have read on minikube issues, but can not find it right now.
HTH

Minikube Start Error (Kubernetes) When Using hyperv Driver on Windows server 2016

I am trying to install Kubernetes on windows server 2016.
I tried to install minikube, and got some errors.
This is the tutorial that I followed:
https://www.assistanz.com/installing-minikube-on-windows-2016-server/
This is the command + error that I got:
PS C:\Windows\system32> minikube start –vm-driver=hyperv –hyperv-virtual-switch=Minikube
Starting local Kubernetes v1.10.0 cluster...
Starting VM... Downloading Minikube ISO
170.78 MB / 170.78 MB [============================================] 100.00% 0s
E1106 19:29:10.616564 11852 start.go:168] Error starting host: Error creating host: Error executing step: Running precreate checks.
: VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path.
Retrying.
E1106 19:29:10.689675 11852 start.go:174] Error starting host: Error creating host: Error executing step: Running precreate checks.
: VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path
================================================================================
An error has occurred. Would you like to opt in to sending anonymized crash
information to minikube to help prevent future errors?
To opt out of these messages, run the command:
minikube config set WantReportErrorPrompt false
================================================================================
Please enter your response [Y/n]:
Someone knows how to solve it?
I googled it, but no luck.
Thanks!
I was never able to get the config parameters to work with minikube start.
I was able to get past this error using the minikube config commands in PowerShell (should also work at a command prompt):
minikube config set vm-driver hyperv
minikube config set hyperv-virtual-switch ExternalSwitch
minikube config view
minikube delete
minikube start
For more information on the command run: minikube config -h
Looking at the documentation you have provided, I have noticed that the screenshot shows a slight difference to the one they've quote.
I have also found this command in another piece of documentation from kubernetes here, showing the same command as that from the screenshot.
I suggest you try the following command;
minikube start --vm-driver=hyperv --hyperv-virtual-switch=Minikube
It is true that OP has pasted the incorrect command, because there is - instead of --. I tried to pass this arguments to minikube and all you get is an instant error. So the issue must be somewhere else. I remember having similar issue and it got resolved after deleting the .kube and .minikube folders and trying to run it again.
After taking a closer look this tutorial is destined for installation of minikube inside of a Windows Server 2016 Virtual Machine, so you have to have a Nested Virtualization able hardware:
Prerequisites The Hyper-V host and guest must both be Windows Server
2016/Windows 10 Anniversary Update or later. VM configuration version
8.0 or greater. An Intel processor with VT-x and EPT technology -- nesting is currently Intel-only. There are some differences with
virtual networking for second-level virtual machines. See "Nested
Virtual Machine Networking".
So the main question is, is that true in your scenario? Are you trying to perform your steps on Windows Server Hyper-V virtual machine with nested virtualization feature?
If you confirm that I have technical possibilities to check it in that scenario.
Otherwise I recommend using the "traditional way" of running minikube in Windows, according for example to this tutorial.

Running Kubernetes Locally via minikube

I am working on openam deployment on Google cloud platform (GCP) and the OS is RHEL7.
I am facing issue while running minikube start.
[root#test ~]# minikube start
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Downloading Minikube ISO
150.53 MB / 150.53 MB [============================================] 100.00% 0s
E0509 06:20:12.950109 16264 start.go:159] Error starting host: Error creating host: Error executing step: Running precreate checks.
: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory.
Retrying.
E0509 06:20:12.951500 16264 start.go:165] Error starting host: Error creating host: Error executing step: Running precreate checks.
: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory
I already installed virtualbox on RHEL.
I want to know how to enable VT-X on GCP?
Thanks
Ashish
You can use --vm-driver=none to run your minikube in cloud. This flag will run your minukube in Docker. You should have installed Docker first.
Also you can create a custom image where VMX will be enabled. Just follow the official documentation instruction.
Example from the documentation on how to create a custom image with enabled VMX:
gcloud compute images create nested-vm-image --source-disk disk1 --source-disk-zone us-central1-a --licenses "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx"
Then, just create a new VM with the custom image.
gcloud compute instances create example-nested-vm --zone us-central1-b --image nested-vm-image
After all, you can install the VirtualBox or KVM and start minikube.

Get server misbehaving error when trying to build an image in Minikube on Windows 10

I have installed Minikube and am following the "Hello minikube" tutorial:
https://kubernetes.io/docs/tutorials/stateless-application/hello-minikube/#create-a-minikube-cluster
I have started minikube using the Hyperv driver:
minikube start --vm-driver="hyperv" --hyperv-virtual-switch="New Virtual Switch" --alsologtostderr
When I try to build an image using the Minikube Docker daemon, get the following error:
Step 1/4 : FROM node:6.9.2
Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 172.24.209.161:53: server misbehaving
What is going wrong here, and how can I fix it?
Here is some info about my environment:
minikube version: v0.23.0
OS: Windows 10 17_09
Try to clear all Docker data. This has done the job to me ;)
Try this if you can build your images on the local machine then take a copy of
/etc/resolv.conf
and copy the values and insert into the minikube cluster's /etc/resolv.conf using minikube ssh after all its just a VM and you are accessing the docker-engine/server using the environment variables..!!!
cheers :)