Is it possible to run Minikube with VirtualBox on

2020-02-07 09:42发布

I want to use minikube on Windows 10. I have installed VirtualBox and want to use it as the virtual machine for minikube. Also I installed Docker for windows. But during installation Docker forced to use Hyper-V as default. But that means I can no longer use VirtualBox to run minikube! Not sure what am I missing here.

I have used minikube on Mac and there it was much simpler: simply open VirtualBox and then run command on command line: minikube start . However in Windows 10 it seems much more complicated.

1条回答
beautiful°
2楼-- · 2020-02-07 10:42

Just to make things clear: Docker requires Hyper-V to be turned on, and Virtualbox requires Hyper-V to be turned off. The reason is they use different virtualization technologies, to be exact - type 1 and type 2 hypervisors:

Type 1 hypervisor: hypervisors run directly on the system hardware – A “bare metal” embedded hypervisor, Type 2 hypervisor: hypervisors run on a host operating system that provides virtualization services, such as I/O device support and memory management.

I've found that there are few approaches to this issue. One of them is adding another boot option and rebooting every time you needed to switch between hypervisors, but it seems that this method is as good as manually turning off Hyper-V, restarting and then using your minikube in VirtualBox. This is probably not the desired state.

So as you can't use them at once, you will have to use a tool that was introduced by Docker for older Windows systems. This is because Docker Toolbox is not using Hyper-V.

Please treat this solution as a workaround, and even Docker does not recommend using Docker toolbox if you can use Docker. Also, you could achieve the same results with minikube running on Hyper-V.

0) Uninstall Docker, turn off Hyper-V, delete all traces of minikube, uninstall VirtualBox (if you tried to run it previously.) 1) Install [Docker Toolbox] - choose full installation2 2) Install Virtualbox, run docker run hello-world inside of Docker Quickstart Terminal and verify if everything is working correctly. 3) Install minikube for Windows (I used chocolatey) 4) Run minikube start.

I've tested this steps, and I was able to run Docker containers in the Docker toolbox in the meantime initializing a Kubernetes cluster in minikube.

查看更多
登录 后发表回答