Can't get Minikube to run on Windows 10 - kubernetes

I installed Minikube on Windows 10 but can't get it to run. I tried to start it with:
minikube start --vm-driver=hyperv
The first error was:
[HYPERV_NO_VSWITCH] create: precreate: no External vswitch found. A valid vswitch must be available for this command to run.
I then searched on Google and found the solution to this error with this page:
https://www.codingepiphany.com/2019/01/04/kubernetes-minikube-no-external-vswitch-found/
I then fixed the problem by defining a vswitch but I got this error:
minikube start --vm-driver hyperv --hyperv-virtual-switch "Minikube"
o minikube v1.0.1 on windows (amd64)
$ Downloading Kubernetes v1.14.1 images in the background ...
> Creating hyperv VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
! Unable to start VM: create: creating: exit status 1
* Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
- https://github.com/kubernetes/minikube/issues/new
This is a pretty generic error. What do I do to get this working? Thanks!

You need to create a Virtual Switch in the HyperV GUI ins Windows and then run it with
minikube start --vm-driver hyperv --hyperv-virtual-switch "Primary Virtual Switch"
Please see the configuration details in this link
https://medium.com/#JockDaRock/minikube-on-windows-10-with-hyper-v-6ef0f4dc158c

I got the same problem just now.
Unable to understand the note given by cmd, I tried open the minikube VM via the Hyper-V GUI, and the GUI provided me with a more comprehensible note: "memory is not adequate"β€”β€” exactly this note helped me to know the problem. I then closed Docker VM (I had opened before), which must have taken a large amount of memory, and started minikube in cmd again, the minikube VM just started as expected.
In a word, this is a problem of limited memory

Related

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

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

Unable to start HyperV VM with Minkube for Kubernetes Cluster for spark in windows 10

I am trying to create a Kubernetes cluster on Windows with the help of Minikube and Hyperv. I tried below things:
1) I have enabled HyperV after following this blog from Microsoft.I confirmed it using systeminfo command and it shows that hypervisor is detected.
2) I ran minikube start --vm-driver=hyperv in admin mode but facing below error:
* Suggestion: Start PowerShell as Administrator, and run: 'Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All'
* Documentation: https://minikube.sigs.k8s.io/docs/reference/drivers/hyperv/
X hyperv does not appear to be installed
3) I also tried creating virtual switch for hyperv and using this command minikube start --vm-driver=hyperv --hyperv-virtual-switch="hypervswitch"but no luck. I also tried minikube start --alsologtostderr -v=7 and I can see from the below logs that hyperv is not installed.
status for hyperv: {Installed:false Healthy:false Error:C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online failed:
Note: I am running each and every command in admin mode. I am not sure what is the problem.
I referred the official github issues blog for my issue but didn't help. Can anyone help me over here? I am stuck since days..
I had the same problem, adding --force worked for me:
minikube start --vm-driver=hyperv --force

Minikube in Windows 10 Enterprise and Hyper-V

Trying to setup minikube under Windows 10 using Hyper-V. https://blog.tekspace.io/getting-started-with-kubernetes-on-windows-10-with-hyper-v/
I found several articles stating that you need to start it with a switch --vm-driver=hyperv, however this does not work for me.
Command I'm running:
minikube start --vm-driver hyperv
What gives?
EDIT1:
Getting stuck on:
Creating hyperv VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
Looks like your old minikube VirtualBox VM is in your MINIKUBE_HOME directory.
minikube delete is also failing because it looks like you uninstall VirtualBox.
You probably need to delete your MINIKUBE_HOME directory completely and then start with:
$ minikube start --vm-driver hyperv
Update:
In addition please refer to Microsoft Hyper-V driver
Requirements:
Hyper-V enabled
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Note:
If Hyper-V was not previously active, you will need to reboot.
An active Hyper-V switch - please foloow the Network Configuration section.
Set the switch you created as the minikube default in the step 2.
minikube config set hyperv-virtual-switch ExternalSwitch
minikube start --vm-driver=hyperv
minikube config set vm-driver hyperv

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.