minikube: Running `minikube delete` breaks `minikube start`

Deleting a running cluster seemed to break minikube.

[~]$ minikube start --show-libmachine-logs=true --stderrthreshold=0
Starting local Kubernetes cluster...
I0707 11:41:38.472798   13936 cluster.go:60] Machine exists!
I0707 11:41:38.730192   13936 cluster.go:60] Machine exists!
I0707 11:41:38.784298   13936 cluster.go:60] Machine exists!
E0707 11:41:38.849506   13936 start.go:70] Error starting host:  Error getting state for host: machine does not exist

Removing the local state (~/.minikube/) fixed the issue in my local environment (OS X + Virtualbox).

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 7
  • Comments: 15 (2 by maintainers)

Most upvoted comments

Hey, until we track down and fix the issue you can just run: minikube delete rm -rf ~/.minikube

Then start

Just FYI - you can get this error message (putting here for SEO purposes):

$ minikube start
Starting local Kubernetes cluster...
E0718 17:25:04.560919   15539 start.go:74] Error starting host:  Error getting state for host: machine does not exist

in my case, using vm-driver xyhyve - had to sudo rm -rf ~/.minikube as some files root owned. Installed from cask, minikube version - 0.23.0.

Hitting this in OSX 10.12.6, minikube version v0.22.3, installed via homebrew cask, with virtualbox 5.1.12r112440

minikube delete causes machine doesn’t exist errors on subsequent minikube start calls.

rm -rf ~/.minikube solves the problem

It turned out the culprit was the Security & Privacy setting in macOS prevented VirtualBox from installed properly. This worked for me:

  1. remove existing virtualbox by trash it && delete all virtualbox related files/folder under ~/Library/
  2. reinstall it with latest version (if macOS is used, make sure check allow button in the Security & Privacy.
  3. minikube delete
  4. rm -rf ~/.minikube
  5. minikube start --> it should download

Good luck!

I just had this problem with minikube 0.26.1. Looking at the verbose output, it hangs on:

Successfully loaded all cached images

@aaron-prindle Might be worth re-opening this one.

Same issue on OSX Sierra + virtualbox. It seems I always have to delete the ~/.minikube directory after stopping minikube. It will then redownload the latest iso and start again

Got this on v0.14 on a osx/xhyve.