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 · 11 comments

Comments

Projects
None yet
@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

This comment has been minimized.

Show comment
Hide comment
@thasmo

thasmo 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

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

This comment has been minimized.

Show comment
Hide comment
@julesbl

julesbl 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

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

This comment has been minimized.

Show comment
Hide comment
@mitchellh

mitchellh Jun 9, 2013

Member

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.

Member

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

Improve network performance for VirtualBox
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

This comment has been minimized.

Show comment
Hide comment
@nicam

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

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

This comment has been minimized.

Show comment
Hide comment
@jdhiro

jdhiro Jun 13, 2014

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

jdhiro commented Jun 13, 2014

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

@jrthib

This comment has been minimized.

Show comment
Hide comment
@jrthib

jrthib 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.

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

Improve network performance for VirtualBox
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

This comment has been minimized.

Show comment
Hide comment
@paulcalabro

paulcalabro Oct 5, 2014

I'd like to know as well? Thanks!

I'd like to know as well? Thanks!

@tmaier

This comment has been minimized.

Show comment
Hide comment
@tmaier

tmaier 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...

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

This comment has been minimized.

Show comment
Hide comment
@Thinkscape

Thinkscape 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

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

This comment has been minimized.

Show comment
Hide comment
@wweiradio

wweiradio Jun 8, 2016

it works thanks

it works thanks

@ianregister

This comment has been minimized.

Show comment
Hide comment
@ianregister

ianregister 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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment