Minikube: Error creating new host: dial tcp: missing address

Created on 6 Jul 2016  路  11Comments  路  Source: kubernetes/minikube

I'm trying to run minikube using the KVM driver inside a Debian Docker container on an Ubuntu host. I get the following error:

root@32116f061fff:/# minikube start --vm-driver=kvm
Starting local Kubernetes cluster...
E0706 20:09:45.755481    3087 start.go:70] Error starting host:  Error creating new host: dial tcp: missing address

I started the container as docker run -it debian. My history in the container looks like this:

root@32116f061fff:/# history
    1  apt-get update && apt-get install curl wget
    2  wget https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.7.0/docker-machine-driver-kvm && chmod +x docker-machine-driver-kvm && mv docker-machine-driver-kvm /usr/local/bin/
    3  curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.5.0/minikube-linux-amd64 && chmod +x minikube && mv minikube /usr/local/bin/
    4  minikube start --vm-driver=kvm
    5  history
kinbug

Most helpful comment

I have this problem on my host. In my case the problem was that I had not installed the libvirt-binpackage (ubuntu). If you can, adding this to requirements/FAQ/IDK would be great.

All 11 comments

Thanks for the report. Could you include the output with "--show-libmachine-logs"?

cc @jimmidyson

You might also need to install libvirt and qemu:
sudo apt-get install libvirt-bin qemu-kvm

This is in the docker-machine-kvm installation instructions, but not the Minikube ones.

Investigated a bit more, looks like this is https://github.com/dhiltgen/docker-machine-kvm/issues/13. I'm not able to run docker-machine-kvm itself with the same setup, so the problem's definitely outside of minikube.

Ah thanks, we should at least try to output a better error here, if we can't fix it outright.

Yeah that's a rubbish error message We can try to validate the libvirt socket if kvm is specified as the driver & produce a better error message with instructions on enabling (e.g. installing libvirt, adding user to libvirtd group, etc) if so. Bit annoying that that setup has to be done. Seems there is some other way using PolicyKit (https://libvirt.org/auth.html#ACL_server_unix_perms) which we would need to update the driver plugin to handle afaik.

I have this problem on my host. In my case the problem was that I had not installed the libvirt-binpackage (ubuntu). If you can, adding this to requirements/FAQ/IDK would be great.

@phillipp Ah thanks! Would you be able to send in a PR with the requirements, probably best in DRIVERS.md#kvm-driver

We could add a check in PreCreate in the upstream driver here: https://github.com/dhiltgen/docker-machine-kvm/blob/master/kvm.go#L289

We will have the fix for this upstream and are waiting on the maintainer to add a license.

Debian 9.0 "Stretch" split the libvirt-bin package into libvirt-clients and others. Thus instead of installing libvirt-bin, one now needs to install libvirt-clients libvirt-daemon. To actually start libvirtd system-wide, one also needs the libvirt-daemon-system package.

Afterwards, there appeared another issue, which I documented in #828.

This has been merged upstream.

@dlorenc Could the additional information about what packages to install on newer distros also be included?

Was this page helpful?
0 / 5 - 0 ratings