[Discuss] [RESOLVED] VirtualBox and Vagrant: DNS won't work on guest
Greg Rundlett (freephile)
greg at freephile.com
Fri Dec 19 16:22:55 EST 2014
Thanks Dave Weingart!!
On Fri, Dec 19, 2014 at 2:12 PM, Greg Rundlett (freephile) <
greg at freephile.com> wrote:
> I am working on a MediaWiki project. I use Mediawiki-Vagrant to setup a
> development environment.
>
[snip]
>
> I've got the latest versions of Virtual Box (4.3.20 r96996), and vagrant
> (1.7.1) running on Ubuntu Linux 14.04
>
[snip]
>
> It seemed that DNS was either not fast enough, or not reliable enough.
>
[snip]
> I've looked at the puppet configs, and the supposed "fixes" for networking
> are directly in the Vagrantfile
>
> config.vm.provider :virtualbox do |vb|
> # See http://www.virtualbox.org/manual/ch08.html for additional
> options.
> vb.customize ['modifyvm', :id, '--memory', settings[:vagrant_ram]]
> vb.customize ['modifyvm', :id, '--cpus', settings[:vagrant_cores]]
> vb.customize ['modifyvm', :id, '--ostype', 'Ubuntu_64']
> vb.customize ['modifyvm', :id, '--ioapic', 'on'] # Bug 51473
>
> # Speed up dns resolution in some cases
> vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
> vb.customize ['modifyvm', :id, '--natdnsproxy1', 'on']
>
>
>
Setting these to OFF fixed the problem
vb.customize ["modifyvm", :id, "--natdnsproxy1", "off"]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "off"]
vagrant provision now completes in 45 seconds!
and nslookup from the guest is using the host's DNS (actually from the
network's router)
time nslookup slashdot.org
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: slashdot.org
Address: 216.34.181.45
real 0m1.162s
user 0m0.041s
sys 0m0.063s
More information about the Discuss
mailing list