Vagrant/VirtualBox can't resolve some domains from w/in VM
Solution 1:
I solved that issue by adding the lines below to my Vagrantfile:
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
Below is the whole of it:
$setup = <<SCRIPT
DEBIAN_FRONTEND=noninteractive apt-get update
SCRIPT
$dependencies = <<SCRIPT
DEBIAN_FRONTEND=noninteractive apt-get install -y postgresql libpq-dev
DEBIAN_FRONTEND=noninteractive apt-get install -y python-dev libjpeg-dev zlib1g-dev
DEBIAN_FRONTEND=noninteractive apt-get install -y python-virtualenv virtualenvwrapper
SCRIPT
Vagrant.configure('2') do |config|
config.vm.box = 'ubuntu/trusty64'
# config.ssh.forward_agent = true
config.vm.network "private_network", ip: "192.168.10.90"
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
config.vm.synced_folder ".", "/siaq"
config.vm.provider :virtualbox do |vb|
vb.name = "siaq"
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--memory", "512"]
end
config.vm.provision "shell", inline: $setup
config.vm.provision "shell", inline: $dependencies
end