network issue with creating docker-machine on Vagrant

74 views
Skip to first unread message

Костя Хомко

unread,
Oct 19, 2017, 11:55:02 AM10/19/17
to Vagrant
Hello guys. 

I am trying to solve an issue with provisioning docker-machine on Vagrant using virtualbox provider about a month but still have no any progress.

The issue is docker-machine can not be created properly and can not start (ssh issue, waiting for ip and so on) on Vagrant box Centos 7.3.

What i have tried to do:

1. Used nested virtualisation: Virtualbox for Vagrant and Virtualbox for docker-machine. BUT, as google tells that Virtualbox does not support nested virtualisation so this binding Host VirtualBox -> guest VirtualBox does not work.

2. That is why i have tried later to ise KVM as host hypervisor. Enabled nested virtualisation in configuration files. But still no luck. Faced with the same issue. "Waiting for IP during call of SSH".

3. I even tried add vagrant user to sudoers with NOPASSWD parameter (in case if ssh fails do to attempt of login), but error still has a place.

4. Tried create docker-machine with "native-ssh" parameter. No luck.

5. Tried to turn of firewall on vagrant and host os, but in this case connectivity does not work at all. 

6. Tried to set selinux in permissive mode but it also does not help.

7. Tried to change virtualbox NIC from intel to VIRTIO type. But is has no affect. Error still the same.

8. Also tried to use for docker-machine creation generic driver instead of virtualbox driver but i am facing with the same issue.

So, looks like after all of this that error is not in virtualbox and not in docker, but in vagrant. And i am little bit tired of this and have no more ideas where to find.
 
Please help to find a root cause and fix it.

Thanks.

Alvaro Miranda Aguilera

unread,
Oct 20, 2017, 2:48:57 AM10/20/17
to vagra...@googlegroups.com
why you want to use that nested setup?

you can have Vagrant installed into a linux VM and create docker containers, no need to do nested setup.

Virusvrij. www.avast.com

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/553aea3f-33e9-46e6-aa80-23c6a2da5c70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Костя Хомко

unread,
Oct 20, 2017, 4:29:30 AM10/20/17
to Vagrant
Hello. 
I need nested virtualisation for docker swarm. Not sure that it is enough only Vagrantfile for this.

пятница, 20 октября 2017 г., 9:48:57 UTC+3 пользователь Alvaro Miranda Aguilera написал:
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.



--
Alvaro

Alvaro Miranda Aguilera

unread,
Oct 20, 2017, 4:31:49 AM10/20/17
to vagra...@googlegroups.com
I am not sure Vagrant is the right tool for you if you want docker swarm.


To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/fae51ddd-cb0f-495b-8702-5657a7de79ff%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Костя Хомко

unread,
Oct 20, 2017, 6:47:57 AM10/20/17
to Vagrant
May be you are right but it is not my wish, it is a test task of employer to be able to show your skills before it can make you job offer.
It is almost done, actually, but only fails on final step when i am trying create docker-machine in Vagrant environment.
I have searched many sites but still have no one proper working solution how to do it. Many people write about "virtio" provider\driver in order to make it work but it has relation to docker, kvm, virtualbox as of off them have such option of paravirtprovider. So it is not still clear where exactly it has to be applied.

пятница, 20 октября 2017 г., 11:31:49 UTC+3 пользователь Alvaro Miranda Aguilera написал:



--
Alvaro

Alvaro Miranda Aguilera

unread,
Oct 20, 2017, 12:20:40 PM10/20/17
to vagra...@googlegroups.com
Hello

Not sure if I follow correctly

perhaps you got mixed between docker-engine and docker-swarm ? docker-machine? etc

you can have multiple docker hosts to use docker swarm

ir



Костя Хомко

unread,
Oct 20, 2017, 5:27:19 PM10/20/17
to Vagrant
No. I have not mixed. I initially created a docker swarm with the command "docker swarm init" and then i was going to add two more nodes which should be created using "docker-machine create ...."  following this manual: https://docs.docker.com/get-started/part4/#create-a-cluster
But anyway thanks for your reference. I will try to use this Vagrantfile as workaround if i will not manage to find the root cause why it fails in current state when i am trying to do it not with help of Vagrantfile shell provisioning but just using Ansible playbook with shell commands "vagrant ssh -c "docker-machine create --driver Virtualbox VM".

пятница, 20 октября 2017 г., 19:20:40 UTC+3 пользователь Alvaro Miranda Aguilera написал:

Joaquin Menchaca

unread,
Nov 10, 2017, 2:24:33 PM11/10/17
to Vagrant
I don't think you need to do nested for Docker Swarm unless you are specifically using Docker Swarm 1.x.  Swarm is integrated into current docker, so there is no need.  There's a lot of instructions and books out there that document the older docker-machine method.

Docker-Machine is going to be hard to get working, as you have to do a virtual system inside a virtual system.  There has been some work to get this to work, but I am not sure how well it works.



--
Alvaro


Reply all
Reply to author
Forward
0 new messages