Closed darkn3rd closed 4 years ago
This looks similar to https://github.com/mitchellh/vagrant/issues/5319.
I think there's something different about how Vagrant is invoking curl
in the subprocess that is slowing it down /cc @mitchellh
This may explain why I get the 18+ minute zone. The curl command run manually from within a vagrant box takes 8 minutes alone, so I don't know if it is a combination of these two factors, or they are the same thing.
+1 to this issue. I'm new to Vagrant and Docker, the hang time on install is brutal when I'm iterating over many different configurations. Unlikely to use either tech if it's so slow all the time.
+1 also happening to me. Same environment/versions - expect host is Linux Mint, not OS X.
+1 Same issue for me. Have we got a solution yet?
+1 Same here, Vagrant 1.8.1 Virtual Box 5.0.20
+1 Vagrant 1.8.1 Virtual Box 5.0.20
Having this same issue as well.
Vagrant 1.8.1 VB 5.0.20
Me too +1
Vagrant 1.8.5 VB 5.0.26 r108824
Vagrant 1.8.5 VB 5.0.26 r108824
I'm wondering if this should even be a bug since, now that I know more about Docker, running it inside a VM seems superfluous. I worked around this by just running Docker on my Desktop.
+1
Vagrant 1.8.1 VB 5.0.24_Ubuntu r108355
+1
Vagrant 1.8.6 VirtualBox 4.3.36_Ubuntu r105129
The alternative is using garethr-docker puppet module to install the docker engine and pulling docker images. I was able to reduce the provisioning time...
+1
I'm experiencing the same issue.
Vagrant version: 1.9.1 VirtualBox version: VirtualBox-5.0.30-112061-Win Host computer OS: Windows 7
+1
Vagrant version: 1.9.1 VirtualBox version: 5.0.30 r112061 Host OS: macOS Sierra (10.12.3)
Are you guys using the new native OSX Docker? If you use the "d.force_host_vm = false" parameter you can skip the step of Vagrant installing and running a VM to run docker within. Here is a Gist showing how I'm using it. https://gist.github.com/nicknezis/fd5845251a8805729cd05bfca5680a15
Also here is the link to Docker for Mac: https://docs.docker.com/docker-for-mac/
@muhammadghazali
The alternative is using garethr-docker puppet module to install the docker engine and pulling docker images. I was able to reduce the provisioning time...
Could you share how you implemented it? I have only used shell provisioners--I haven't used Puppet.
I'm wondering if this should even be a bug since, now that I know more about Docker, running it inside a VM seems superfluous. I worked around this by just running Docker on my Desktop.
@sijpkes For the majority of Docker users among the Linux, macOS, and Windows crowd, yes, Docker ideallys runs "natively" from the host without any additional Vagrant virtualization bogging things down. And yet there are likely some Docker users who, for whatever reason, want to run Docker on even stranger hosts--BSD, Haiku, Solaris, and so on, where Docker may not be easy to obtain, and so some sort of VM for a Docker-friendly guest may be more convenient in the short term, while waiting for Docker support to come to their poison ahem OS of choice.
Context: At the time this was written, docker in xhyve (docker-for-mac) or hyper-v (docker-for-win) were new, and docker-machine with virtualbox provider was still popular. Vagrant was an alternative to docker-machine, but it was slow, as the download.
It seems newer version of vagrant will just use native docker (or docker in hyper-v on win or hyperkit on mac via docker-for-win and docker-for-mac), as config.vm.provider("docker") { |dkr| dkr.force_host_vm = false }
is false by default. So this would need to be set to true to reproduce on Win/Mac/Lin.
For using alternative tool or process, e.g. puppet, ansible, etc., is not the scope of the bug, as the bug is the vagrant provisioner, when it needs to fetch docker and install in the vm, it takes abnormally long time.
Hi there,
It looks like this has been resolved within a previously shipped version of Vagrant so I am now closing this issue. If the original issue was not fully resolved, please reopen this issue or create a new one.
Cheers!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Vagrant version
Host operating system
Guest operating system
Vagrantfile
Debug output
https://gist.github.com/darkn3rd/775f9b496f3d80d57ba3
Expected behavior
Expecting that using vagrant's docker provisioner would take around two minutes. I looked through the debug output, and it seems the curl command takes a lot of time, about 8 minutes. Using steps documented from Docker Ubuntu Install, the install takes
2m12.201s
:Actual behavior
Vagrant provision takes unusually long time. Sometimes between 9 minutes and 18 minutes, which is too slow to be usable.
Steps to reproduce
vagrant up --no-provision
vagrant provision