Hi ,
I am trying to start minikube on my windows 10 machine from command line. Docker is also installed on the same machine. However while i try to start the minikube i get below error.
E1017 11:26:35.485871 7632 start.go:153] Error starting host: Error creating host: Error executing step: Running precreate checks.
: This computer is running Hyper-V. VirtualBox won't boot a 64bits VM when Hyper-V is activated. Either use Hyper-V as a driver, or disable the Hyper-V hypervisor.
Can anybody please help for the same
The error indicates the problem; You can not have both VirtualBox and Hyper-V installed. Use the Hyper-V driver. The standard behaviour for minikube is to use the virtualbox driver. You need to start with specifying you want to use Hyper-V:
PS> minikube start --vm-driver hyperv
but you need to read the topic: https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperv-driver as there are limitations at the moment, such as the need for an External Switch (unable to share the DockerNAT network at the moment)
i tried to start with hyperv as virtual box driver, still not succeed
C:\WINDOWS\system32>minikube start --vm-driver=hyperv
Starting local Kubernetes v1.7.5 cluster...
Starting VM...
E1017 11:47:47.912415 11488 start.go:147] Error starting host: Error creating host: Error executing step: Creating VM.
: exit status 1.
please remove the old instance by deleting before starting again. the config file might have been created and still refer to the wrong driver.
@gbraad Not sure what is the issue.
C:\WINDOWS\system32>minikube delete
Deleting local Kubernetes cluster...
Machine deleted.
Error deleting machine profile config
C:\WINDOWS\system32>minikube start --vm-driver=hyperv
Starting local Kubernetes v1.7.5 cluster...
Starting VM...
E1017 12:14:35.833061 19008 start.go:147] Error starting host: Error creating host: Error executing step: Creating VM.
: exit status 1.
Retrying.
E1017 12:14:35.907066 19008 start.go:153] Error starting host: Error creating host: Error executing step: Creating VM.
: exit status 1
can you start with debug or increased verbosity? More information is needed
here is the verbose output. Not sure why it is saying out of memory error .
C:\WINDOWS\system32>minikube start --vm-driver=hyperv --log_dir D:/minikubelog.txt --v 8
Starting local Kubernetes v1.7.5 cluster...
Starting VM...
[executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Get-VM minikube ).state
[stdout =====>] : Off
[stderr =====>] :
[executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Start-VM minikube
[stdout =====>] :
[stderr =====>] : Start-VM : 'minikube' failed to start.
Not enough memory in the system to start the virtual machine minikube.
Could not initialize memory: Ran out of memory (0x8007000E).
'minikube' failed to start. (Virtual machine ID 67EA7218-CBEA-4D9F-8A87-F278A4F2127F)
Not enough memory in the system to start the virtual machine minikube with ram size 2048 megabytes. (Virtual machine ID 67EA7218-CBEA-4D9F-8A87-F278A4F2127F)
'minikube' could not initialize memory: Ran out of memory (0x8007000E). (Virtual machine ID 67EA7218-CBEA-4D9F-8A87-F278A4F2127F)
At line:1 char:1
+ Start-VM minikube
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : FromStdErr: (:) [Start-VM], VirtualizationException
+ FullyQualifiedErrorId : OutOfMemory,Microsoft.HyperV.PowerShell.Commands.StartVM
E1017 12:28:19.667111 17788 start.go:147] Error starting host: Error starting stopped host: exit status 1.
Retrying.
E1017 12:28:19.719117 17788 start.go:153] Error starting host: Error starting stopped host: exit status 1
Not enough memory in the system to start the virtual machine minikube with ram size 2048 megabytes.
Hyper-V does not support memory ballooning and overcommiting. You really need to have 2GB free to be able to start the VM. You can probably stop the Docker instance MobylinuxVM and try again.
Closing issue as this is related to Hyper-V's behaviour.
@gbraad , it should be part of pre-flight checks. isn't it?
Issue is there https://github.com/kubernetes/minikube/issues/1591
Related issue on Minishift's end: https://github.com/minishift/minishift/issues/1384
is there any other way rather than shutting than MobiLinuxVM
Add more memory to your machine, or close other processes that consume memory.
How much does your machine have in total?
The reason i suggest to disable mobylinuxvm is that you can also use the minikube iso to run docker containers. The command minikube docker-env can help with setting this up...
You might be able to check how much memory is free with PowersShell:
PS> $system = Get-WmiObject -Class Win32_OperatingSystem
PS> ([math]::round(($system.FreePhysicalMemory / 1mb), 2))
which will display the result in Gigabytes
It is showing 0.69GB . but my system is having 8 GB of RAM .. are docker images eating the memory ?
Applications eat memory, containers eat storage... however, if you run many containers inside the Docker VM it might allocate more than the 2GB assigned as Hyper-V does dynamic scaling. You can use Task Manager, or Process Explorer to find out where you are allocating this memory. To check how much the VMs have consumed, use Hyper-V Manager console.
I use both MobylinuxVM (Docker for Windows) and Minikube/Minishift and I have 16GB in my machine. When both run, about 3 to 4G remains...
@gbraad I'm not sure if I should open a new issue, but I want to know how you're currently running minikube on your machine. I have both Docker for Windows and Minikube installed but I have MobyLinuxVM off/disabled. When I try to start minikube the first time, it works but once I stop the container and try to restart it again, it fails.
So far I was able to get it up and running again if I recreate an external virtual switch (which also involved system reboot because it seems to fail without it. I could be wrong though....) but this is not ideal.
Any tips?? If it helps, this is my reference when trying to run minikube: http://www.jamessturtevant.com/posts/Running-Kubernetes-Minikube-on-Windows-10-with-WSL/
Did you try running minikube start --vm-driver hyperv as administrator?
Both Docker and Minikube needs memory, that鈥檚 it. I also have a Windows machine of 16GB memory and I feel like just enough to host both.
Most helpful comment
The error indicates the problem; You can not have both VirtualBox and Hyper-V installed. Use the Hyper-V driver. The standard behaviour for minikube is to use the virtualbox driver. You need to start with specifying you want to use Hyper-V:
but you need to read the topic: https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperv-driver as there are limitations at the moment, such as the need for an External Switch (unable to share the DockerNAT network at the moment)