Unable to start minikube using docker driver

7/2/2020

I'm trying to start a minikube machine with minikube start --driver=docker. But I'm seeing the following error.

😄  minikube v1.9.2 on Ubuntu 20.04
✨  Using the docker driver based on user configuration
👍  Starting control plane node m01 in cluster minikube
🚜  Pulling base image ...
🔥  Creating Kubernetes in docker container with (CPUs=6) (8 available), Memory=8192MB (15786MB available) ...
🤦  StartHost failed, but will try again: creating host: create host timed out in 120.000000 seconds
🔥  Deleting "minikube" in docker ...
🔥  Creating Kubernetes in docker container with (CPUs=6) (8 available), Memory=8192MB (15786MB available) ...
❗  Executing "docker inspect -f {{.State.Status}} minikube" took an unusually long time: 3.934644373s
💡  Restarting the docker service may improve performance.

❌  [CREATE_TIMEOUT] Failed to start docker container. "minikube start" may fix it. creating host: create host timed out in 120.000000 seconds
💡  Suggestion: Try 'minikube delete', and disable any conflicting VPN or firewall software
⁉️   Related issue: https://github.com/kubernetes/minikube/issues/7072

minikube status returns

E0702 08:25:03.817735   36017 status.go:233] kubeconfig endpoint: empty IP
m01
host: Running
kubelet: Stopped
apiserver: Stopped
kubeconfig: Misconfigured


WARNING: Your kubectl is pointing to stale minikube-vm.
To fix the kubectl context, run `minikube update-context`

I've been using this driver for a few weeks now and it worked fine without any errors until yesterday. I tried restarting docker daemon and service but the issue is still there.

Docker version 19.03.8, build afacb8b7f0

minikube version: v1.9.2 commit: 93af9c1e43cab9618e301bc9fa720c63d5efa393

Ubuntu 20.04 LTS

EDIT I managed to start the machine without any changes on a later attempt, but it takes a considerable time to start (5-10 mins). Any ideas as to why this is happening?

-- RrR-
docker
kubernetes
minikube
ubuntu

2 Answers

12/10/2020

I had the same issue (Ubuntu 20.04 as well).

IOMMU was not enabled by kernel

$ virt-host-validate
[...]
QEMU: Checking if IOMMU is enabled by kernel: WARN
[...]

I followed the recipe there: https://serverfault.com/questions/633183/how-do-i-enable-kvm-device-passthrough-in-linux i.e. edit /etc/default/grub, then update-grub, then reboot

And it worked perfectly.

Not sure if it will fix your issue but worth checking the iommu status.

-- Serge Chastel
Source: StackOverflow

1/28/2021

The solution to this issue is to enable IOMMU in your GRUB boot parameters.

You can do this by setting the following in /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on"

If you're using an AMD processor, you should append amd_iommu=on to the boot parameters instead

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amd_iommu=on"

Then run update-grub and reboot

-- Fahd Rahali
Source: StackOverflow