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

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.

Related

minikube failed to start

Hello so i was using yesterday minikube and it was working fine but today i was trying to start with minikube start command and it give the following errors :
and after running minikube status it give the following result :
Thanks in advance for any help.
You are getting the following error:
Exiting due to GUEST_START: Failed kubeconfig update: could not read config: Error decoding config from data control character are not allowed
and
getting k8s client: client config: error loading config file "C:\Users<Your User>/.kube/config control characters are not allowed
Those errors indicates that your $KUBECONFIG has an invalid character in it.
Troubleshooting
For the future use, please provide more detailed information. It's well described in Minikube Troubleshooting. The following commands might provide useful information for troubleshooting:
$ minikube logs
$ minikube start --alsologtostderr -v=2
$ kubectl config view
In minikube output there is also updating the running virtualbox "minikube" VM It might be related with network changes.
Possible Solution
Remove config file from C:\Users\<Your User>/.kube/ and start minikube again.
Update your Minikube to newest version (current is 1.16).
Recreate your minikube cluster using minikube delete and create new one.
Execite minikube update context.

Minikube "start" command is not creating vm or cluster(See Screen Shot)

I am trying to runminikube start--vm - driver = virtualbox orminikube start--vm - driver = hyperv by enabling the hyper - visor, but i am getting below error.
Can Someone please take me out of this:
For future, please try to post text instead of pic in your question. Second thing is that you are using quite old versions.
Usually errors like:
status error: host: state: machine does not exist minikube windows
The "minikube" host does not exist
are shown where you have some "leftovers" from previous minikube cluster.
It's hard to determine root cause exactly as it would need exact steps you have performed.
1. Delete previous minikube and start again
You have to use command like:
minikube delete
if you specified name of cluster using
minikube delete -p <your-cluster-name>
After that you should start minikube again.
minikube start --vm-driver=<depends-on-your-needs>
Here you have all drivers you can use with minikube.
2. Use --force flag.
It would look like:
minikube start --vm-driver=hyperv --force
but it's also recommended to user minikube delete before this command.
3. Steps to run Minikube on Windows.
As you mentioned you already have docker, but if you would need to reinstall, you can find good tutorial on Docker official docs.
Good tutorial, how run Minikube on Windows 10 can be found here.
You can also check this StackOverflow thread for more updated version.
4. Further issues with starting minikube
If you will still have issues with running minikube, please update your question with debug logs. It can be found here.
minikube start --vm-driver=hyberv --v=7
or
minikube logs

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

How to fix VM issue with minikube start ?

I am a beginner to Kubernetes and starting off with this tutorial. I installed VM and expected to be able to start a cluster by using the command:
minikube start
But I get the error:
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
E0911 13:34:45.394430 41676 start.go:174] Error starting host: Error
creating host: Error executing step: Creating VM.
: Error setting up host only network on machine start: The host-only
adapter we just created is not visible. This is a well known
VirtualBox bug. You might want to uninstall it and reinstall at least
version 5.0.12 that is is supposed to fix this issue.
It says that it is a well known bug in Virtualbox but I installed its latest version. Any ideas?
Figured out the issue. VirtualBox was not installed correctly as Mac had blocked it. It wasn't obvious at first.
Restarting won't work if VirtualBox isn't installed correctly.
System Preferences -> Security & Privacy -> Allow -> Then allow the software corporation (in this case Oracle)
Restart
Now it worked as expected.
Have you tried restarting your computer after installing the VirtualBox ?
(seems to be also a known bug to docker-machine which is used by minikube to initialize you local env)
This definitely worked for me, starting minikube by specifying vm-driver and kubernetes-version
minikube start --vm-driver=hyperkit --kubernetes-version v1.16.0
Faced a similar issue in Mac after upgrading to big sur. The running minikube instance started giving the same error.
The solution that worked for me was to run a minikube delete, followed by a minikube start.
More combination of this option can be found in the thread below -
https://github.com/kubernetes/minikube/issues/3614

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.