dhiltgen / docker-machine-kvm

KVM driver for docker-machine
Apache License 2.0
376 stars 117 forks source link

When creating a machine docker-machine-kvm doesn't try to start the network #12

Open vikstrous opened 8 years ago

vikstrous commented 8 years ago

It would be nice if one doesn't need to manually start the network after a fresh install of libvirt and before using it with docker-machine.

devurandom commented 7 years ago

Coming from kubernetes/minikube#828, I had a look at https://github.com/dhiltgen/docker-machine-kvm/blob/master/kvm.go#L284 and compared that with my observation: I see two networks in virt-manager: default and docker-machines. docker-machines was set to auto start and was active when I looked at it. default was neither active nor set to auto start.

From the code it appears that the kvm-network (aka external network, default) is handled slightly differently from the private network (docker-machines). Thus I assume this issue can be fixed by placing the calls to SetAutoStart(true) and Create() (after LookupNetworkByName(...)) also in validateNetwork(...), just like they are present in validatePrivateNetwork()?