kubernetes minikube start issue with virtualbox in windows-7

6/26/2018

Environment: I have Windows-7 machine. I have installed Docker Toolbox (which installed Oracle Virtual Box version: 5.2.8r121009)

C:\Users>VBoxManage -version
5.2.8r121009

When I launch virtual box and check version of linux using command: cat /proc/version

Linux version 4.9.93-boot2docker (root@eb591e1ad697) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Thu May 10 16:27:54 UTC 2018

Minikube version (use minikube version):v0.28.0

OS (e.g. from /etc/os-release):

NAME=Boot2Docker
VERSION=18.05.0-ce
ID=boot2docker
ID_LIKE=tcl
VERSION_ID=18.05.0-ce
PRETTY_NAME="Boot2Docker 18.05.0-ce (TCL 8.2.1); HEAD : b5d6989 - Thu May 10 16:35:28 UTC 2018"
ANSI_COLOR="1;34"
HOME_URL="http://boot2docker.io"
SUPPORT_URL="https://github.com/boot2docker/boot2docker"
BUG_REPORT_URL="https://github.com/boot2docker/boot2docker/issues"

VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): No such file or directory

ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION): No such file or directory

What happened:

I installed kubectl using curl:

curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl

Then as per instructions on https://kubernetes.io/docs/tasks/tools/install-kubectl/ I made kubectl executable and moved to PATH.

Then I went to https://github.com/kubernetes/minikube/ and went to Installation section for linux to install minikube. That installed minikube version: v0.28.0

See below details:

docker@default:/home/kubernetes$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube
 /usr/local/bin/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 40.8M  100 40.8M    0     0  2039k      0  0:00:20  0:00:20 --:--:-- 2373k
docker@default:/home/kubernetes$ minikube version
minikube version: v0.28.0
docker@default:/home/kubernetes$ minikube start
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Downloading Minikube ISO
 153.08 MB / 153.08 MB [============================================] 100.00% 0s
E0625 21:25:20.969504    6371 start.go:168] Error starting host: Error creating host: Error executing step: Running precreate checks.
: VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path.

 Retrying.
E0625 21:25:20.975760    6371 start.go:174] Error starting host:  Error creating host: Error executing step: Running precreate checks.
: VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path
================================================================================
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]:

Expected result: minikube should start properly without any error.

Steps to reproduce it :

1. Get windows docker toolbox and install on windows 7
2. start docker quickstart terminal
3. ssh docker@192.168.99.100
4. install-kubectl
5. install minikube
6. command: start minikube

\========================================================

UPDATE-1

As suggested in comments by @mk_sta:

I reinstalled VirtualBox latest version and then ran docker-machine command and I got same error.

docker@default:~$ docker-machine version 
docker-machine version 0.14.0, build 89b8332 
docker@default:~$ docker-machine create --driver virtualbox default 
Creating CA: /home/docker/.docker/machine/certs/ca.pem 
Creating client certificate: /home/docker/.docker/machine/certs/cert.pem 
Running pre-create checks... Error with pre-create check: "VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path"

I also installed kubectl binary via curl for linux. When I tried to check its version, I got below error

docker@default:~$ kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-2
7T20:17:28Z", GoVersion:"go1.10.2", Compiler:"gc", Platform:"linux/amd64"}
The connection to the server localhost:8080 was refused - did you specify the right host or port?
-- Shivraj
docker
kubernetes
minikube
virtualbox
windows-7

3 Answers

6/26/2018

As per the logs provided from minikube installation:

E0625 21:25:20.969504 6371 start.go:168] Error starting host: Error creating host: Error executing step: Running precreate checks. : VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path.

In that case, I would recommend you to reinstall VirtualBox to the latest version on your Windows 7 machine and execute the next command as per solution given in this post:

docker-machine create --driver virtualbox default

Please also do not forget to delete old minikube folder [User folder]/.minikube before you start with re-installation.

-- mk_sta
Source: StackOverflow

6/27/2018

I would suggest following the standard procedure of minikube installation via this link. My presumption is that you have tried to install minikube entirely in boot2docker Linux shell which was running on local VirtualBox hypervisor; however, it is hard to install VirtualBox driver for minikube setup inside a virtual machine.

-- mk_sta
Source: StackOverflow

8/16/2018

faced similar issue on macos high sierra, stopped the processes of docker which are currently running, issue is occuring because virtualbox is not installed properly.

ps -ef|grep docker
sudo kill -9 <pid in above command output>

now i followed the below url : https://github.com/Homebrew/homebrew-cask/issues/39369,

#!/bin/bash

unload() {
    if [ `ps -ef | grep -c VirtualBoxReact App -ne 0 ]
    then
            echo "VirtualBox still seems to be running. Please investigate!!"
            exit 1;
    elif [ `ps -ef | grep -c [V]ir` -gt 0 ]
    then
            echo "Stopping running processes before unloading Kernel Extensions"
            ps -ef | grep [V]ir | awk '{print $2}' | xargs kill
    fi
    echo "Unloading Kernel Extensions"
    kextstat | grep "org.virtualbox.kext.VBoxUSB" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxUSB
    kextstat | grep "org.virtualbox.kext.VBoxNetFlt" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxNetFlt
    kextstat | grep "org.virtualbox.kext.VBoxNetAdp" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxNetAdp
    kextstat | grep "org.virtualbox.kext.VBoxDrv" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxDrv
}

load() {
    echo "Loading Kernel Extentions"
    sudo kextload "/Library/Application Support/VirtualBox/VBoxDrv.kext" -r "/Library/Application Support/VirtualBox/"
    sudo kextload "/Library/Application Support/VirtualBox/VBoxNetAdp.kext" -r "/Library/Application Support/VirtualBox/"
    sudo kextload "/Library/Application Support/VirtualBox/VBoxNetFlt.kext" -r "/Library/Application Support/VirtualBox/"
    sudo kextload "/Library/Application Support/VirtualBox/VBoxUSB.kext" -r "/Library/Application Support/VirtualBox/"
}

case "$1" in
    unload|remove)
            unload
            ;;
    load)
            load
            ;;
    *|reload)
            unload
            load
            ;;
esac

copy paste this script in the script-run, give 755 permissions to it. Run this script after you attempt to install virtualbox. Keep approving the kexts until the script runs cleanly:

enter image description here

click allow, now try to run the below command, this should successfully install virtualbox:

brew cask reinstall --force virtualbox;
sudo minikube start;

If you are still getting error:

sudo minikube delete;
sudo minikube start;
sudo minikube dashboard;
-- vijay
Source: StackOverflow