docker-machine-kvm icon indicating copy to clipboard operation
docker-machine-kvm copied to clipboard

dial tcp: missing address

Open padcom opened this issue 8 years ago • 16 comments

Error while creating KVM-based machine using docker-machine 0.6.0

$ docker-machine create --driver kvm -v node01 dial tcp: missing address

Using v0.6.0 for both kvm plugin and docker-machine on Linux Mint 17.3 (based on Ubuntu 14.04.4).

Is there anything else I should specify or is this a bug?

padcom avatar Mar 06 '16 11:03 padcom

I'm not sure, but that might be a case of missing permissions on the libvirt socket. I'd like to improve the driver to verify permissions and what not, and provide better error messages when things aren't quite set up properly. Until then, you should try to use another libvirt client to make sure you can create a VM first using your account (not sudo'd) You can try virsh, or the virt-manager GUI.

If you're able to successfully create a VM with other tools, and the driver still doesn't work, try running a create with debug enabled and post the results on this issue.

dhiltgen avatar Mar 06 '16 17:03 dhiltgen

I had the same issue. I could fix it by adding my user id to the libvirtd group in /etc/group and creating a new session with that user on the machine (either via a new ssh connection to localhost or by logging out and logging in again from my desktop environment).

ogrisel avatar Mar 30 '16 13:03 ogrisel

I want to run docker machine with kvm driver inside a docker container, but "dial tcp: missing address". I need to run docker machine for ci.

R-omk avatar May 26 '16 08:05 R-omk

My situation is the same as @R-omk's in that I'm trying to run inside of a docker container, so logout/login is trickier. In case anyone wants to try and reproduce this, the following commands will do it on my Ubuntu machine:

$ docker run --privileged -it debian
root@22567f5ad1d7:/# apt-get update && apt-get install libvirt-bin qemu-kvm curl wget
root@22567f5ad1d7:/# curl -L https://github.com/docker/machine/releases/download/v0.8.0-rc2/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine &&   chmod +x /usr/local/bin/docker-machine
root@22567f5ad1d7:/#  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/
root@22567f5ad1d7:/# docker-machine create -d kvm myengine0
dial tcp: missing address

ekuefler avatar Jul 06 '16 21:07 ekuefler

I have the exact same problem. Debugging said:

() DBG | Failed to connect to libvirt: [Code-38] [Domain-7] Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory

What I don't know is: what/who should be creating said socket?

phillipp avatar Jul 12 '16 10:07 phillipp

I am seeing the same symptoms, but I think the underlying issue is different. This is on Debian Sid:

If I run the docker-machine-driver-kvm as myself, I get: Failed to connect to libvirt: [Code-89] [Domain-47] error from service: CheckAuthorization: Message recipient disconnected from message bus without replying

As root, things work as expected.

However, as my own user I can happily use (e.g.) virsh create ... to create a VM, a network, etc. This is using the qemu:///session connection rather than qemu:///system and if I change:

connectionString   = "qemu:///session"

and now when I run docker-machine-driver-kvm as myself, I get:

This is a Docker Machine plugin binary. Plugin binaries are not intended to be invoked directly. Please use this plugin through the main 'docker-machine' binary. (API version: 1)

Yay! :-)

Hope this helps...

Note that my ~/.config/libvirt/libvirt.conf

uri_default = "qemu:///session"

And my environment also has:

LIBVIRT_DEFAULT_URI=qemu:///session

So neither of those are being used, although strace does show the ~/.config/libvirt/libvirt.conf being opened, which was how I discovered the file in the first place.

Thanks, Andrew McMillan

karora avatar Aug 03 '16 13:08 karora

I had same issue as phillipp on fedora 24 - fixed with a restart.

jgedarovich avatar Apr 02 '17 18:04 jgedarovich

On Fedora 24, I'm seeing the same issue discussed here, but nothing worked so far.

Not working even for root user and strace does not suggest what the problem might be.

paoloantinori avatar May 04 '17 11:05 paoloantinori

On Red Hat Enterprise Linux Server release 7.1 (Maipo) after a reboot

docker-machine create -d kvm myengine0
Creating CA: /home/user/.docker/machine/certs/ca.pem
Creating client certificate: /home/user/.docker/machine/certs/cert.pem
Running pre-create checks...
Error with pre-create check: "[Code-43] [Domain-19] Network not found: no network with matching name 'default'"

gliptak avatar Jun 07 '17 18:06 gliptak

http://wiki.libvirt.org/page/Networking

# virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 docker-machines      active     yes           yes

Is there a (command line) override available? Thanks

gliptak avatar Jun 07 '17 18:06 gliptak

Was #18 supposed to have fixed all instances of this issue? I ran into this problem while trying to get Minikube running inside a Docker container (https://github.com/kubernetes/minikube/issues/927 and https://github.com/kubernetes/minikube/issues/278). The container is Debian Jessie, freshly downloaded from Dockerhub, Docker version 17.03.1-ce build c6d412e, docker-machine version 0.12.0 build 45c69ad, docker-machine-vm 10.0. Running docker-machine create --driver kvm dev while logged into the container as root gives dial tcp: missing address. The outer Docker version is the same. It's running on MacOS 10.12.5 (16F73).

ceridwen avatar Jun 08 '17 01:06 ceridwen

Getting this problem on archlinux with the latest version of everything. Whether I am root or not I get this error and nothing suggested helps.

insidewhy avatar Jul 28 '17 12:07 insidewhy

For anyone who is having troubles with this error. if you're trying to install the plugin under Debian 8 the last release of this plugin uses a recent version of "libvirt.so.0" library, Debian Jessie use the libvirt.so.0.1002.9, so you have to install an older release of this plugin like docker-machine-kvm "v0.6.0". it should work that way.

diegom626 avatar Aug 09 '17 18:08 diegom626

@ohjames I too had the issue, starting the libvirtd service fixed it. sudo systemctl start libvirtd But other errors starts to show up. like: Requested operation is not valid: network 'default' is not active

To fix the second error, you have to set the default network interface to active, to fix it sudo virsh net-start deafult active you can list the network cards by sudo virsh net-list --all

anjannath avatar Sep 07 '17 22:09 anjannath

Not sure if its relevant here or better suited for the Rancher folks, but trying to import the driver into a Rancher container running docker-machine yields the same result.

Error dialing to plugin server's address(), err=dial tcp: missing address

zchef2k avatar Feb 07 '18 15:02 zchef2k

anyone solved this for rancher?

tariksimsek avatar Jan 17 '24 10:01 tariksimsek