Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minishift - cannot start - Error starting the VM: Error getting the state for host: machine does not exist

I ran Docker applications locally in an environment of Windows 10 Home, Oracle Virtualbox, The extension pack, Docker toolbox and Minishift.

Restarting after a few months, I get all kinds of errors. When I re-run minishift, I get a bunch of "OK's" and finally I get this message:

Starting Minishift VM .... FAIL E0807 20:29:20.950373 672 start.go:428] Error starting the VM: Error getting the state for host: machine does not exist. Retrying.

The command is: $ minishift start --vm-driver=virtualbox --memory=3G

First, I start docker via the Docker Quickstart terminal. Because I can work with docker (and openshift) I know the environment is correct.

How can I get minishift run again?

like image 266
tm1701 Avatar asked Feb 02 '26 16:02

tm1701


2 Answers

Clean up using the following command:

minishift delete --clear-cache

Restarting minishift will recreate all necessary stuff.

like image 142
tm1701 Avatar answered Feb 05 '26 07:02

tm1701


It is possible that Minishift config contains wrong data. Reasons can be many, one them, for example, is that the VM got deleted via VirtualBox GUI and thus the Minishift has data about VM which does not exist. During the startup Minishift then asks for the status of VM, but VirtualBox cannot provide any information about it as it does not exist. In cases like this my workflow is:

  1. Delete the VM (if there is any) using the hypervisor - for example VirtualBox GUI or KVM's virsh command,
  2. Delete the Minishift home directory, located at %userprofile%\.minishift in case of Windows or ~/.minishift for Unix systems,
  3. Try to start Minishift.

Please note that this is rather destructive way of getting over the problem and if you have valuable data on the VM then you might consider more gentle approaches.

like image 44
Andreas Gajdosik Avatar answered Feb 05 '26 08:02

Andreas Gajdosik