machine-drivers / docker-machine-driver-xhyve

docker-machine/minikube/minishift driver plugin for xhyve/hyperkit (native macOS hypervisor.framework)
https://godoc.org/github.com/machine-drivers/docker-machine-driver-xhyve
BSD 3-Clause "New" or "Revised" License
888 stars 74 forks source link

Cannot remove or create dinghy VM, xhyve process in weird state #224

Open mashalifshin opened 4 years ago

mashalifshin commented 4 years ago

I'm running Mojave 10.4.6 on a 2018 15inch Macbook pro, running dinghy with xhyve driver. I saw this only one time, and the developer for dinghy suggested this might be a driver issue and that I contact you here.

This occurred after the macbook crashed with a kernel panic (but that's a separate story). Here is a step by step of what happened, in the hopes this will be helpful for debugging.

Trying to restart the VM:

$ dinghy restart
The VM 'dinghy' does not exist in docker-machine. Run dinghy create to create the VM, dinghy help create to see available options. Okay, try to create it again:

$ dinghy create
Creating the dinghy VM... Docker machine "dinghy" already exists /usr/local/Cellar/dinghy/4.6.5/cli/dinghy/system.rb:8:in system_print': Failure callingdocker-machine create -d xhyve --xhyve-memory-size 2048 --xhyve-cpu-count 4 --xhyve-disk-size 20000 dinghy(System::Failure) from /usr/local/Cellar/dinghy/4.6.5/cli/dinghy/machine.rb:130:insystem_print' from /usr/local/Cellar/dinghy/4.6.5/cli/dinghy/machine.rb:16:in create' from /usr/local/Cellar/dinghy/4.6.5/cli/cli.rb:65:increate' from /usr/local/Cellar/dinghy/4.6.5/cli/thor/lib/thor/command.rb:27:in run' from /usr/local/Cellar/dinghy/4.6.5/cli/thor/lib/thor/invocation.rb:126:ininvoke_command' from /usr/local/Cellar/dinghy/4.6.5/cli/thor/lib/thor.rb:359:in dispatch' from /usr/local/Cellar/dinghy/4.6.5/cli/thor/lib/thor/base.rb:440:instart' from /usr/local/bin/_dinghy_command:12:in `

'

Okay I'll try to remove it then:

$ docker-machine rm dinghy About to remove dinghy WARNING: This action will delete both local reference and remote instance. Are you sure? (y/n): y Error removing host "dinghy": Unable to find 'xhyve' process by PID: 2729

I am still regularly experiencing those kernel panics, but this particular issue has never recurred. However, if there is some debugging info you'd like me to pull in case this happens again, just let me know where I can find logs and I will be happy to update this thread.

darcy commented 4 years ago

I did a brew update that got me stuck in this state somehow, this got me running again: https://github.com/kubernetes/minikube/issues/4291#issuecomment-494335628