Minikube Drama in Mac OS

caused by Virtual Box

Kasun Dilunika
dtlpub
3 min readJul 17, 2019

--

Today I tried to install minikube in my mac using straight forward steps as per the following kubernetes documentation. It looks like 2 minutes process of running copy-paste commands. However, the show was different.

As per the documentation, first you have to install kubectl and then the hypervisor. So, I installed kubectl and skipped hypervisor part (since I had Virtual Box installed already) and installed minikube directly. Everything went well until I run minikube start command.

  minikube start -p jkd
😄 minikube v1.2.0 on darwin (amd64)
💿 Downloading Minikube ISO ...
129.33 MB / 129.33 MB [============================================] 100.00% 0s
🔥 Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
E0717 10:03:41.593314 45784 start.go:559] StartHost: create: creating: 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
💣 Unable to start VM
❌ Error: [VBOX_HOST_ADAPTER] create: creating: 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
💡 Advice: Reboot to complete VirtualBox installation, and verify that VirtualBox is not blocked by your system
📘 Documentation: https://stackoverflow.com/questions/52277019/how-to-fix-vm-issue-with-minikube-start
⁉️ Related issues:
https://github.com/kubernetes/minikube/issues/3614
https://github.com/kubernetes/minikube/issues/4222
😿 If the above advice does not help, please let us know:
👉 https://github.com/kubernetes/minikube/issues/new

As the error message suggests, I thought this is something to do with Virtual Box version. Since I had the 5.x version installed, I decided to install the latest Virtual Box.

Nothing fancy there, I downloaded thedmg file and then followed the wizard which I have done several times with no issue. But, not this time. I got the following error.

Quick google search educated me that MacOS has blocked software auto installations from Oracle until you allow it. The following link tells the story.

Allowed the installation and ran minikube again. No dramas, everything works fine.

  minikube start
😄 minikube v1.2.0 on darwin (amd64)
💡 Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one.
🏃 Re-using the currently running virtualbox VM for "minikube" ...
⌛ Waiting for SSH access ...
🐳 Configuring environment for Kubernetes v1.15.0 on Docker 18.09.6
🔄 Relaunching Kubernetes v1.15.0 using kubeadm ...
⌛ Verifying: apiserver proxy etcd scheduler controller dns
🏄 Done! kubectl is now configured to use "minikube"

However, I found out later even the previous issue is caused by this MacOS security restriction. One of the issue links shown in the previous bug has one comment mentioning that.

The summary is if you some wired error when you are trying to run minikube, before wasting any time, do the following steps:

  1. Pull down the  Apple menu and open System Preferences
  2. Choose “Security & Privacy” and go to the ‘General’ tab within the Security preference panel, then click the lock button and enter the administrator password
  3. At the bottom of the Security General section, look for the message stating “System software from developer ‘Oracle America, Inc’ was blocked from loading” and click the “Allow” button

If your VirtualBox version is old, then install VirtualBox you will see installation is failing as I mentioned earlier. Again follow the above three steps, install VirtualBox successfully and run minikube start

--

--

Kasun Dilunika
dtlpub
Editor for

Software Architect at Digital Transformation, NZ