Installing Minikube on Ubuntu vm_VT-X / AMD-v, allowing VM inside another virtual machine

I am trying to install minikube in Ubuntu vm (in a virtual box). I have enabled VT-X / AMD-v for vm. But I get the following error.

# minikube start Starting local Kubernetes cluster... E0217 15:00:35.395801 3869 start.go:107] Error starting host: Error creating host: Error with pre-create check: "This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory". Retrying. E0217 15:00:35.396019 3869 start.go:113] Error starting host: Error creating host: Error with pre-create check: "This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory" ================================================================================ 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]: 

I found a link according to which we cannot have virtualization inside virtualization. It's true? How can i fix this?

+21
ubuntu kubernetes minikube
source share
7 answers

Virtual Box does not support VT-X / AMD-v in nested virtualization . See this open ticket / ticket request at virtualbox.org.

There are also a few more questions and answers here on SO discussing this topic .

Possible solutions:

  1. As mentioned: use another hypervisor that supports VT-X / AMD-v in nested virtualization (e.g. Xen, KVM, or VMware).
  2. Install Minikube on the host OS, not on the virtual machine .
  3. Launch Minikube directly using Docker and the "none" option, as described in Ted Guskis' answer .
+21
source share

Launch Minikube directly on the virtual machine using Docker and the driver option "none", which does not require nested virtualization.

Set the parameter none none:

 [ root@minikube ~]# minikube config set vm-driver none 

Install Docker-ce the following instructions for your version of VM.

The minikube launch is starting:

 [ root@minikube ~]# systemctl enable docker Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service. [ root@minikube ~]# systemctl start docker [ root@minikube ~]# minikube start Starting local Kubernetes v1.10.0 cluster... Starting VM... Getting VM IP address... Moving files into cluster... Downloading kubeadm v1.10.0 Downloading kubelet v1.10.0 Finished Downloading kubelet v1.10.0 Finished Downloading kubeadm v1.10.0 Setting up certs... Connecting to cluster... Setting up kubeconfig... Starting cluster components... Kubectl is now configured to use the cluster. =================== WARNING: IT IS RECOMMENDED NOT TO RUN THE NONE DRIVER ON PERSONAL WORKSTATIONS The 'none' driver will run an insecure kubernetes apiserver as root that may leave the host vulnerable to CSRF attacks When using the none driver, the kubectl config and credentials generated will be root owned and will appear in the root home directory. You will need to move the files to the appropriate location and then set the correct permissions. An example of this is below: sudo mv /root/.kube $HOME/.kube # this will write over any previous configuration sudo chown -R $USER $HOME/.kube sudo chgrp -R $USER $HOME/.kube sudo mv /root/.minikube $HOME/.minikube # this will write over any previous configuration sudo chown -R $USER $HOME/.minikube sudo chgrp -R $USER $HOME/.minikube This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true Loading cached images from config file. 
+20
source share

Try to launch a mini-cube without nested virtualization (docker must be installed):

 minikube start --vm-driver=none 

From the Kubernete documentation :

Minikube also supports the -vm-driver = none option, which runs Kubernetes components on the host, not the virtual machine. To use this driver, Docker and a linux environment are required, but not a hypervisor.

+4
source share

Verify that the virtual machine is turned on (run inside the virtual machine):

 egrep -i '^flags.*(svm|vmx)' /proc/cpuinfo 

And in the VM core:

 dmesg | egrep 'DMAR|IOMMU' 

VirtualBox only works with a 32-bit nested guest, so also check (it does not support nested guests, but works with 32-bit):

 uname -m 
+3
source share

"Install Minikube on the host OS, not on the virtual machine."

this is not entirely correct, in fact you can install minikube in a Linux VM on top of a virtual or vmware, etc. without a driver option that uses localkube directly for kubernets in the VM host docker.

you can use this little script in Linux VM to start minikube in a few minutes.

https://github.com/robertluwang/docker-hands-on-guide/blob/master/minikube-none-installation.md

+2
source share

I installed VMware and installed Virtualbox inside the virtual machine. And included VT-X / AMD-v in the external VM. It works great.

+1
source share

Hi everyone, I used the below Minikube launch command --vm driver = no

but shows an unsupported version of docker

please tell me how to fix the error

thanks

0
source share

All Articles