I've been developing a couple different linux boxes (Ubuntu 12.04 LTS and
14.04 LTS).. all of them suffer from poor network performance.
I notice inside the guest, my test suite takes 6 seconds tops... outside,
when fired from the host OS (OS X in this case) to the guest Linux OS, it
can take anywhere from 5 minutes to 6 minutes.
Attached is a screenshot of the time differential and more importantly my
Vagrantfile is attached. Any help speeding up the boxes would be
appreciated. I have tried both VirtualBox AND VMware fusion images, with
and without NFS enabled. All are about the same time-wise.
-Erik
Vagrant.configure("2") do |config|
config.vm.box = "phusion-open-ubuntu-14.04-amd64"
config.vm.box_url =
"https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box"
config.vm.provider :vmware_fusion do |f, override|
override.vm.box_url =
"https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vmwarefusion.box"
end
# provisioning necessary software for EC2 deployment
config.vm.provision :shell, :path => ".devops/bootstrap.sh", :args =>
"/vagrant" #pass root folder as param
config.vm.network :private_network, ip: "192.168.56.2"
config.vm.synced_folder '.', '/vagrant', nfs: true
config.vm.provider :virtualbox do |vb|
host = RbConfig::CONFIG['host_os']
# Give VM 1/4 system memory & access to all cpu cores on the host
if host =~ /darwin/
cpus = `sysctl -n hw.ncpu`.to_i
elsif host =~ /linux/
cpus = `nproc`.to_i
end
vb.customize ["modifyvm", :id, "--cpus", cpus]
vb.customize ["modifyvm", :id, "--memory", "1024"]
vb.gui = false
end
config.vm.provider :vmware_fusion do |vb|
vb.vmx["memsize"] = "1024"
vb.gui = false
end
if
Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty?
# Install Docker
pkg_cmd = "wget -q -O - https://get.docker.io/gpg | apt-key add -;" \
"echo deb http://get.docker.io/ubuntu docker main >
/etc/apt/sources.list.d/docker.list;" \
"apt-get update -qq; apt-get install -q -y --force-yes lxc-docker; "
# Add vagrant user to the docker group
pkg_cmd << "usermod -a -G docker vagrant; "
config.vm.provision :shell, :inline => pkg_cmd
end
end
--
You received this message because you are subscribed to the Google Groups
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.