All guest machines are unable to connect to the Internet

Discussions related to using VirtualBox on Linux hosts.
Post Reply
nih2
Posts: 2
Joined: 19. Feb 2009, 14:31

All guest machines are unable to connect to the Internet

Post by nih2 »

I've moved from England to the USA, and now all of my guest machines are unable to connect to the Internet.

My host OS is Xubuntu 8.10; I'm using VirtualBox 2.1.4; my guest OSes are Windows XP SP3, Windows 7 beta, and Xubuntu 8.10, all with Guest Additions. Internet connectivity for the guest machines was fine in England, where the host was connected to a wireless network with no security other than MAC address filtering. I moved to Belgium for a while, where the wireless connection had a WEP key; again no problem. Now, in the States, again with only MAC address filtering, the guest machines cannot connect.

I'm puzzled because I thought that if the host OS was connected, the guest OS was pretty much guaranteed wired connectivity. I realise that my move to the US is likely to be a red herring. Are there any likely reasons for a sudden failure of connectivity of the guest machines? Am I missing something obvious?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: All guest machines are unable to connect to the Internet

Post by vbox4me2 »

I think your missing something obvious, check the Host IP settings such as gateway/dns and the way it connects, release/renew IP lease, etc... maybe your host firewall is in a different mode since your local ip range has (dramaticly) changed(other zone).
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: All guest machines are unable to connect to the Internet

Post by Sasquatch »

How are the Guests connecting to the internet? Are they using NAT (advised) or Host Interface? If it's the latter, that might be the problem.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
nih2
Posts: 2
Joined: 19. Feb 2009, 14:31

Re: All guest machines are unable to connect to the Internet

Post by nih2 »

Thanks for the suggestions, guys. I tried changing between NAT and Host Interface, but that made no difference. I eventually found the solution today. The following is my understanding of the situation, but bear in mind I know very little about networks!

My friend, who I'm staying with, has a DNS server associated with his router. Although the server is switched off, it seems that the Xubuntu network manager is automatically adding its IP address at the top of /etc/resolv.conf. (A DHCP issue?) This slows down domain name lookup within Xubuntu, but after a few seconds presumably the lookup times out and the system uses one of the other DNS IP addresses. However, this seems to completely throw Internet connectivity in the guest machines. If I comment out the router DNS entry, guest machine connectivity is restored. (And browsing in Xubuntu is a lot faster!) As soon as the Xubuntu network manager rewrites resolv.conf, reinstating the router DNS entry (which seems to happen once or twice a day if I do not reboot), the guest machines are again offline.

So vbox4me2 was correct that the problem was DNS-related! I hope this post helps somebody...
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: All guest machines are unable to connect to the Internet

Post by Sasquatch »

Yes, your diagnose is correct. NAT passes only the first DNS server of the Host to the Guest, so if the first one doens't work, the Guest won't have anything to work with.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply