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

Very slow network connection #1807

Closed
julesbl opened this issue Jun 7, 2013 · 12 comments
Closed

Very slow network connection #1807

julesbl opened this issue Jun 7, 2013 · 12 comments

Comments

@julesbl
Copy link

@julesbl julesbl commented Jun 7, 2013

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

@thasmo
Copy link

@thasmo thasmo commented Jun 7, 2013

You could try to add:

config.vm.provider :virtualbox do |vb|
  vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
  vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
@julesbl
Copy link
Author

@julesbl julesbl commented Jun 8, 2013

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

@mitchellh
Copy link
Member

@mitchellh mitchellh commented Jun 9, 2013

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.

@mitchellh mitchellh closed this Jun 9, 2013
griff pushed a commit to griff/docker that referenced this issue Oct 31, 2013
Without those lines, VitrualBox machines are being very slow with all network operations (tested only in OS X Lion, but they are supposed to work everywhere). See hashicorp/vagrant#1807
@nicam
Copy link

@nicam nicam commented Nov 28, 2013

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!!!

whatupdave pushed a commit to whatupdave/helpful-web that referenced this issue Apr 30, 2014
swalkinshaw added a commit to roots/trellis that referenced this issue Jun 11, 2014
@jdhiro
Copy link

@jdhiro jdhiro commented Jun 13, 2014

This isn't just a VirtualBox thing. I run into the exact same problem with the Parallels provider.

@jrthib
Copy link

@jrthib jrthib commented Sep 11, 2014

This seems to work. Does anyone have an explanation of what is happening behind the scenes to cause the slow down? Just curious.

shykes pushed a commit to shykes/docker-dev that referenced this issue Oct 2, 2014
Without those lines, VitrualBox machines are being very slow with all network operations (tested only in OS X Lion, but they are supposed to work everywhere). See hashicorp/vagrant#1807
@paulcalabro
Copy link

@paulcalabro paulcalabro commented Oct 5, 2014

I'd like to know as well? Thanks!

@tmaier
Copy link

@tmaier tmaier commented Dec 29, 2014

This issue also exists on the vagrant-parallels provider. See Parallels/vagrant-parallels#97

There might be a more general fix necessary...

@Thinkscape
Copy link

@Thinkscape Thinkscape commented Oct 7, 2015

Test case: a wget of an url from a public cdn:

  1. Run on guest machine (debian jessie) = crawl at ~30kB/s
  2. 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

@wweiradio
Copy link

@wweiradio wweiradio commented Jun 8, 2016

it works thanks

@ianregister
Copy link

@ianregister ianregister commented Oct 18, 2016

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.

@hashibot
Copy link

@hashibot hashibot bot commented Apr 3, 2020

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.

@hashibot hashibot bot locked and limited conversation to collaborators Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet