Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run on CentOS #9

Closed
lazyval opened this issue Feb 3, 2016 · 10 comments
Closed

Unable to run on CentOS #9

lazyval opened this issue Feb 3, 2016 · 10 comments

Comments

@lazyval
Copy link

lazyval commented Feb 3, 2016

$ cat /etc/issue
CentOS release 6.7 (Final)
Kernel \r on an \m
$ uname -a
Linux <snip> 2.6.32-573.12.1.el6.x86_64 #1 SMP Tue Dec 15 06:42:08 PST 2015 x86_64 x86_64 x86_64 GNU/Linux
$ bin/docker-machine-driver-kvm 
bin/docker-machine-driver-kvm: /usr/lib64/libvirt.so.0: version `LIBVIRT_1.1.1' not found (required by bin/docker-machine-driver-kvm)
bin/docker-machine-driver-kvm: /usr/lib64/libvirt.so.0: version `LIBVIRT_1.0.2' not found (required by bin/docker-machine-driver-kvm)
$ libvirtd --version
libvirtd (libvirt) 0.10.2

Any other info I need to provide in order to isolate issue?

For sure, I know that true way to use this driver is to issue following command, but it doesn't work either:

$ docker-machine create -d kvm myengine0
Error loading driver "kvm": dial tcp: missing address
@dhiltgen
Copy link
Owner

dhiltgen commented Feb 3, 2016

It looks like the centos 6.x version is too old. Not sure if RH has been backporting things for it upstream, but the mainline 0.10 release looks to be ~4 years old according to the libvirt.org page.

Not sure what the best course of action is. Looking at Centos 7, I see it has 1.2.17 libvirt, which is more likely to work (I don't have a physical centos box to test/confirm) If you're stuck on 6.x, you might consider downloading the source from http://libvirt.org/downloads.html to update it.

@lazyval
Copy link
Author

lazyval commented Feb 3, 2016

Thanks for a quick response! Yup, we're stuck with Centos 6.x :-(
I will test with a newer libvirt and let you know

@lazyval lazyval closed this as completed Feb 3, 2016
@jhmnieuwenhuis
Copy link

I have the same issue as a normal user in centos 7:

docker-machine create -d kvm dockerhans1
dial tcp: missing address

When I login as root it works fine and the machine is created

Any ideas ?

@dhiltgen
Copy link
Owner

dhiltgen commented Mar 8, 2016

@jhmnieuwenhuis you probably haven't wired up group membership to allow your user account access to the libvirt socket. It depends on the distro, but I think most packaing sets it up as root only, but you can add members to a group (something like "libvirt" to allow access. Here's an example from my Ubuntu based system:

% ls -l /var/run/libvirt/libvirt-sock
srwxrwx--- 1 root libvirtd 0 Feb 29 17:24 /var/run/libvirt/libvirt-sock=
% groups
daniel adm cdrom sudo dip plugdev lpadmin sambashare docker libvirtd

@jhmnieuwenhuis
Copy link

spot on !!
That solved the issue.
B.t.w. Excellent job on the kvm plugin !!

Regards,

Hans Nieuwenhuis

@jhmnieuwenhuis
Copy link

One other question.
When i create "normal" vm's on centos7 using virt-install i use lvm thin volumes.
I suppose that's not possible when using docker-machine -d kvm ??

Regards,
Hans

@dhiltgen
Copy link
Owner

dhiltgen commented Mar 8, 2016

That's not currently possible, but could be added.

If you wanted to take a crack at it and submit a PR, I think most of the logic would live within https://github.com/dhiltgen/docker-machine-kvm/blob/master/kvm.go#L654-L670 and perhaps a new command line flag to toggle the behavior.

@jhmnieuwenhuis
Copy link

Well that's not something I am able to do.
My knowledge does not go that far.
I consider myself a student although I am 60 years old and live in the Netherlands.
Due to a serious accident I had to retire from work last year.
I have always been a (project)manager in IT with an interest in programming and document management.
These days I do voluntary work with elderly people, I love to tour on my bike and
to keep my brain in shape I study.
( php, postgresql, symfony, drupal, centos7, kvm and since a week also docker)
My plan is to create a drupal site with all kinds of information on above subjects and on bicycling.
But thanks for the quick responses on my questions.
If I can help by testing something, let me know.

Regards,
Hans

@jhmnieuwenhuis
Copy link

Hi, two more observations

when I run docker-machine upgrade on a kvm machine as a non-root user it will not work.
error :
chmod /home/hn/.docker/machine/machines/docker1/boot2docker.iso: operation not permitted
this file is owned by qemu:qemu

when I use "--kvm-network default" when creating the kvm machine, there wil be
2 network interfaces created one for source-network default and one for source-network
docker-machines.

when i use "--kvm-network docker-machines" there are also two network interfaces created
but they are both for source-network docker-machines

There where already kvm vm's created on my host before I used docker on it.
They where created using virt-install and using source-network default.

Regards,

Hans

@dhiltgen
Copy link
Owner

dhiltgen commented Mar 9, 2016

#1 is probably a genuine bug. I don't usually use upgrade in my workflow, so it may have regressed since I originally wrote the driver.

For #2, the driver could be enhanced to detect this case, but it shouldn't cause any major problems to have two interfaces on the same network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants