Minikube in Windows 10 Enterprise and Hyper-V - kubernetes

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

Related

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 start automatically selects hyperkit as driver

I installed minikube and Virtualbox on OS X and was working fine until I executed
minikube delete
After that I tried
minikube start
and got the following
😄 minikube v1.5.2 on Darwin 10.15.1
✨ Automatically selected the 'hyperkit' driver (alternates: [virtualbox])
🔑 The 'hyperkit' driver requires elevated permissions. The following commands will be executed:
...
I do not want to use a different driver, why is this happening? I reinstalled minikube but the problem persisted. I could set which driver to use with:
minikube start --vm-driver=virtualbox
But I would rather have the default behavior after a fresh install. How can I set the default driver?
After googling a bit I found how to do it here
minikube config set vm-driver virtualbox
This command output is
⚠️ These changes will take effect upon a minikube delete and then a minikube start
So make sure to run
minikube delete
and
minikube start

Can't get Minikube to run on Windows 10

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

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 on Windows 10 with Hyper-V stuck on "Starting cluster components"

I'm using minikube on windows 10 and trying to start it using Hyper-V.
Because I'm behind a corporate proxy and use CNTLM to avoid authentication. I added the http_proxy and https_proxy as docker env.
minikube start --vm-driver hyperv --hyperv-virtual-switch "PrimaryVirtualSwitch" --docker-env http_proxy=http://10.55.35.143:3128 --docker-env https_proxy=http://10.55.35.143:3128 --memory 8192 --cpus 4
The output is the following:
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
At the last step "Starting cluster components" the command stucks.
I tried to enable verbose output but it doesn't log anything after reaching the "Starting cluster components" step.
The command minikube ssh is working and I can ping 10.55.35.143:3128.
Could anyone give me a hint what I'm doing wrong?
Additional Information
Minikube version: v0.28.0
Download cmder, type bash to switch to bash, export http_proxy and https_proxy and run minikube start.
You can find more information about the related topic at https://github.com/kubernetes/minikube/issues/2425.
You may also try to launch minikube with --bootstrapper=localkube option.
I was also stuck "Starting cluster components..."
After a lot of retries I found out in some github issue that I have to add the global system variable MINIKUBE_HOME and then it worked. The variable has to point to the path where minikube.exe is installed.
MINIKUBE_HOME=C:\Program Files (x86)\Kubernetes\Minikube