Very slow network connection
Hi
Been using a vagrant 2 installation of ubuntu 12.04 on a Linuxmint host.
Getting very slow internet connection on all connections.
Vagrant file has this
Vagrant.configure("2") do |config|
This Vagrantfile is auto-generated by vagrant package to contain
the MAC address of the box. Custom configuration should be placed in
the actual Vagrantfile in this box.
config.vm.base_mac = "080027129698" config.vm.network :public_network config.vm.synced_folder "/home/julianb/MyDocuments/WebSites/JamesGrey/ContentCapsule/working", "/var/ContentCapsule" config.vm.network :forwarded_port, guest: 80, host: 8080 end
When I look at the config using virtualbox admin there are two adapters configured, a NAT with the ports forwarded and a bridge without any ports forwarded. which is, presumably why the problems are occurring.
Anybody got any ideas how to fix this?
Jules
You could try to add:
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
Hi Thomas
Thanks for this, worked like a dream.
Jules
On 07/06/13 21:51, Thomas Deinhamer
wrote:
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"] end
--
w34u - Websites Which Work For You www.w34u.com 07833 512221 Company: JB Development Ltd. Company No: 06604371
Thanks, I'm glad you figured this out. Unfortunately, the heuristic for when to enable/disable this is really just... not strong. I don't know the cases when internet is slow. Sigh VirtualBox.
config.vm.provider :virtualbox do |vb| vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"] end
worked like a charm, thank you!!!
This isn't just a VirtualBox thing. I run into the exact same problem with the Parallels provider.
This seems to work. Does anyone have an explanation of what is happening behind the scenes to cause the slow down? Just curious.
I'd like to know as well? Thanks!
This issue also exists on the vagrant-parallels provider. See https://github.com/Parallels/vagrant-parallels/issues/97
There might be a more general fix necessary...
Test case: a wget of an url from a public cdn:
- Run on guest machine (debian jessie) = crawl at ~30kB/s
- Run on host machine = around 27MB/s.
I was able to fix it (for the most part) using this: http://superuser.com/a/850389/174755
it works thanks
I had success with the localhost:3000 responding-painfully-slow issue using Vagrant. On OS X I followed the instructions in previous posts, disabled IPv6, and changed my hostname from example.local to example.vm (or whatever you want) and then both VirtualBox and Fusion started responding in under 200ms down from 5000ms.
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.