Vagrant DNS Slowness
This is way out of date now
The information in this post is so out-dated that I wonder why I'm keeping it around. I guess I'm a digital hoarder...
I've started using Vagrant a lot, and the one complaint I have is sometimes contacting and downloading items from the interwebs takes WAY longer than it should. I sat and waited for ruby to install a bundle that took over 10 minutes. (compared to less than a minute outside the vagrant)
Some Google-Fu later, I found this tweak.
# Add this to your Vagrant File
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
If you already have a config.vm.provider :virtualbox do |vb|
section, just add vb.customize ["modifyvm", :id, "--natdnshostresolver1",
"on"]
inside it.
After adding this tweak (and restarting my Vagrant) I no longer had the lengthy ruby bundle installs.