Add a couple of network performance tweaks to Vagrantfile.
This commit is contained in:
parent
cd77c75d6c
commit
7596de1aec
1 changed files with 12 additions and 2 deletions
14
Vagrantfile
vendored
14
Vagrantfile
vendored
|
@ -84,6 +84,16 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
config.vm.provider :virtualbox do |vb|
|
config.vm.provider :virtualbox do |vb|
|
||||||
vb.name = "mastodon"
|
vb.name = "mastodon"
|
||||||
vb.customize ["modifyvm", :id, "--memory", "1024"]
|
vb.customize ["modifyvm", :id, "--memory", "1024"]
|
||||||
|
|
||||||
|
# Disable VirtualBox DNS proxy to skip long-delay IPv6 resolutions.
|
||||||
|
# https://github.com/mitchellh/vagrant/issues/1172
|
||||||
|
vb.customize ["modifyvm", :id, "--natdnsproxy1", "off"]
|
||||||
|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "off"]
|
||||||
|
|
||||||
|
# Use "virtio" network interfaces for better performance.
|
||||||
|
vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
|
||||||
|
vb.customize ["modifyvm", :id, "--nictype2", "virtio"]
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.hostname = "mastodon.dev"
|
config.vm.hostname = "mastodon.dev"
|
||||||
|
@ -91,9 +101,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
# This uses the vagrant-hostsupdater plugin, and lets you
|
# This uses the vagrant-hostsupdater plugin, and lets you
|
||||||
# access the development site at http://mastodon.dev.
|
# access the development site at http://mastodon.dev.
|
||||||
# To install:
|
# To install:
|
||||||
# $ vagrant plugin install hostsupdater
|
# $ vagrant plugin install vagrant-hostsupdater
|
||||||
if defined?(VagrantPlugins::HostsUpdater)
|
if defined?(VagrantPlugins::HostsUpdater)
|
||||||
config.vm.network :private_network, ip: "192.168.42.42"
|
config.vm.network :private_network, ip: "192.168.42.42", nictype: "virtio"
|
||||||
config.hostsupdater.remove_on_suspend = false
|
config.hostsupdater.remove_on_suspend = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue