Skip to content

Instantly share code, notes, and snippets.

@codesword
Last active October 31, 2019 21:27
Show Gist options
  • Save codesword/423d80ea29849410dcc97c3542450955 to your computer and use it in GitHub Desktop.
Save codesword/423d80ea29849410dcc97c3542450955 to your computer and use it in GitHub Desktop.
Installing minikube using xhyve driver

###Install docker-machine-driver-xhyve docker-machine-driver-xhyve is a docker machine driver plugin for xhyve native OS X Hypervisor. xhyve is a lightweight OS X virtualization solution. In my opinion, it's a far better option than virtualbox for running minikube. ####Brew On MacOS sierra, download latest using

brew install docker-machine-driver-xhyve --HEAD
sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

####Build from source

go get -u -d github.com/zchee/docker-machine-driver-xhyve
cd $GOPATH/src/github.com/zchee/docker-machine-driver-xhyve

# just in case
git submodule update --init

# build and install 
make install
# or if want verbose
make install V=1

###Install minikube OSX

curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.12.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

###Start Minikube

minikube start --memory=2048 --vm-driver=xhyve

#To debug you can start minikube using:
minikube start --v=5 --logtostderr --show-libmachine-logs --vm-driver=xhyve

After starting, wait a few seconds for minikube to stabilize before running any kubectl command. If you try running immediately, you might run into error: You must be logged in to the server (the server has asked for the client to provide credentials) error.

@alexw23
Copy link

alexw23 commented Mar 18, 2017

Having the same problem - did you find a fix?

Running xhyve directly through docker machine works fine...

@elmpp
Copy link

elmpp commented Nov 20, 2017

When starting up minikube, the following is required now (background)
minikube start --v=10 --vm-driver=xhyve

@gngchrs
Copy link

gngchrs commented Jan 3, 2018

@ekhaydarov
Copy link

whats wrong with xhyve?

@till
Copy link

till commented Jun 22, 2018

Doesn't seem like anything is wrong with xhyve. Hyperkit includes xhyve and it seems it is a more maintained or developer friendly approach to include xhyve.

@quantum-fusion
Copy link

minikube start --vm-driver hyperkit
Starting local Kubernetes cluster...
E0307 14:55:35.972574 27724 start.go:90] Error starting host: Error getting state for host: Driver "xhyve" not found. Do you have the plugin binary accessible in your PATH?. Retrying.
E0307 14:55:35.973220 27724 start.go:96] Error starting host: Error getting state for host: Driver "xhyve" not found. Do you have the plugin binary accessible in your 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

@quantum-fusion
Copy link

minikube config set vm-driver hyperkit
[Driver hyperkit is not supported]

@HighwayofLife
Copy link

xhyve was deprecated in minikube 1.13, in favor of hyperkit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment