Re: Trouble with domain resolution in Vagrant/VirtualBox

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Trouble with domain resolution in Vagrant/VirtualBox

David Cyrus
I've been experiencing this as well.

On Saturday, 21 July 2012 06:39:54 UTC+8, meltemi wrote:
Trying to get started with Vagrant on Mac OS X Lion (10.7.4) but can't reach us.archive.ubuntu.com from w/in the VM. I'm new so I'm sure it's something obvious. 

Here are my first steps...

Installed VirtualBox from dmg: <https://www.virtualbox.org/wiki/Downloads>
Installed Vagrant 1.0.3 from dmg: <http://downloads.vagrantup.com/>

Downloaded a box: $ vagrant box add lucid64 http://files.vagrantup.com/lucid64.box

cd ~/deployingrails/
$ mkdir first_box
$ cd first_box
$ vagrant init lucid64
$ vagrant up
vagrant up
[default] Importing base box 'lucid64'...
[default] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.
Guest Additions Version: 4.1.16
VirtualBox Version: 4.1.18
[default] Matching MAC address for NAT networking...
. . .
$ vagrant ssh

So I download Guest Additions 4.1.18 and attempt to install them:

vagrant@lucid64:~$ sudo vbox/VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.1.18 Guest Additions for Linux.........
VirtualBox Guest Additions installer
Removing installed version 4.1.16 of VirtualBox Guest Additions...
tar: Record size = 16 blocks
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The make utility was not found. If the following module compilation fails then
this could be the reason and you should try installing it.

The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.

Building the main Guest Additions module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions ...done.
Installing the Window System drivers ...fail!
(Could not find the X.Org or XFree86 Window System.)

"The make utility was not found". Hmm. new to Ubuntu. let's try to update some packages:

vagrant@lucid64:~$ sudo apt-get install dkms -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  fakeroot make patch
Suggested packages:
  make-doc diffutils-doc
The following NEW packages will be installed:
  dkms fakeroot make patch
0 upgraded, 4 newly installed, 0 to remove and 23 not upgraded.
Need to get 458kB of archives.
After this operation, 2,359kB of additional disk space will be used.
Err http://us.archive.ubuntu.com/ubuntu/ lucid/main make 3.81-7ubuntu1
  Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ lucid/main patch 2.6-2ubuntu1
  Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main dkms 2.1.1.2-2ubuntu1
  Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com/ubuntu/ lucid/main fakeroot 1.14.4-1ubuntu1
  Could not resolve 'us.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


I cannot ping us.archive.ubuntu.com from within the VM but I can ping google.com and www.apple.com and ge.com (but not apple.com (w/out the www)).

FWIW the host can ping us.archive.ubuntu.com and every other domain name just fine.

sudo apt-get update fails as well for same reason. I have no idea how to proceed…

FWIW-
vagrant@lucid64:~$ cat /etc/resolv.conf 
nameserver 10.0.2.3

Appreciate any help…

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.