kitematic icon indicating copy to clipboard operation
kitematic copied to clipboard

[macOS] Kitematic destroys existing vm named "default" managed by docker-machine when using other driver than virtualbox.

Open fbsb opened this issue 9 years ago • 1 comments

Expected behavior

Kitematic use existing vm (created via docker-machine) named "default".

Actual behavior

Kitematic removes/destroys the existing vm named default when using other driver than virtualbox.

Information about the Issue

This only happens when using other docker-machine drivers like xhyve driver.

docker version:

$ docker version
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.8.1
 Git commit:   89658be
 Built:
 OS/Arch:      darwin/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 21:43:09 2017
 OS/Arch:      linux/amd64
 Experimental: false

docker-machine version:

$ docker-machine version
docker-machine version 0.11.0, build 5b27455

docker-machine-driver-xhyve version:

$ brew info docker-machine-driver-xhyve
docker-machine-driver-xhyve: stable 0.3.2 (bottled), HEAD

kitematic version: 0.17.0

Kitematic checks whether a virtualbox vm exists named "default and since I'm using the xhyve driver, the default vm managed by docker-machine gets destroyed. Kitematic should not use virtualbox directly when probing existing vms but rather ask docker-machine.

The logic for destroying/creating vms when starting happens here.

Steps to reproduce the behavior

  1. Install docker, docker-machine via brew
$ brew install docker docker-machine
  1. Install xhyve driver for docker-machine by following instructions
$ brew install docker-machine-driver-xhyve

# docker-machine-driver-xhyve need root owner and uid
$ 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
  1. Create default machine
$ docker-machine create --driver xhyve default
  1. docker-machine reports a vm named default using driver xhyve
$ docker-machine ls
NAME      ACTIVE   DRIVER   STATE     URL                       SWARM   DOCKER        ERRORS
default   -        xhyve    Running   tcp://192.168.64.4:2376           v17.05.0-ce
  1. Install kitematic via brew cask
$ brew cask install kitematic
  1. Start kitematic
  2. docker-machine reports a vm named default using driver virtualbox
$ docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER        ERRORS
default   -        virtualbox   Running   tcp://192.168.99.100:2376           v17.05.0-ce

fbsb avatar May 08 '17 15:05 fbsb

It's been documented that Kitematic will use/create a VM called default - I would suggest naming your other vm something else than default. For example: docker-machine create --driver xhyve xdefault will solve all of your issues

FrenchBen avatar May 09 '17 20:05 FrenchBen