Guest can't connect to Internet

Discussions related to using VirtualBox on Linux hosts.
Post Reply
satimis
Posts: 506
Joined: 12. Jun 2007, 03:41

Guest can't connect to Internet

Post by satimis »

Hi all,

Host - Ubuntu 16.04
Guest - Ubuntu 16.04
VirtualBox

There are 1 or 2 guests unable to ping domain but can ping its ip address. Host can ping guests and guests can ping host.

I have searched a while and couldn't figure out the problem. Please help.

Thanks

Regards
satimis
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Guest can't connect to Internet

Post by socratis »

satimis wrote:There are 1 or 2 guests unable to ping domain
What do you mean "1 or 2". Is it 1, or is it 2? Out of how many? If you can ping VM <-> host, then it's not a VirtualBox problem, it's a general networking problem. Treat it accordingly.

BTW, you didn't mention the exact VirtualBox version, you didn't mention your exact VirtualBox network setup, you didn't mention your general network setup. No wonder you couldn't figure out the problem, you haven't defined the problem accurately ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
satimis
Posts: 506
Joined: 12. Jun 2007, 03:41

Re: Guest can't connect to Internet

Post by satimis »

Hi,

VirtualBox 5
installed on Ubuntu 16.04 repos

⟫ apt-cache policy virtualbox

Code: Select all

virtualbox:
  Installed: 5.0.14-dfsg-2
  Candidate: 5.0.14-dfsg-2
  Version table:
 *** 5.0.14-dfsg-2 500
        500 http://ubuntu.01link.hk xenial/multiverse amd64 Packages
        100 /var/lib/dpkg/status
Host Ubuntu 16.04
Guest Ubuntu 16.04/Window10/Kubuntu 16.04 etc

Network
Attached to - Bridged Adapter
Name - br0

This box has been running for several years without problem. VirtualBox was installed on the package download on VirtualBox website.

Recently (about 2 weeks ago) on starting VirtualBox Manager following warning popup;

Code: Select all

A new version of VirtualBox has been released! Version 5.1.22 is available at virtualbox.org
You can downhload this version using the link:
......
⟫ dpkg-query -W | grep -i virtualbox

Code: Select all

unity-scope-virtualbox  0.1+13.10.20130723-0ubuntu1
virtualbox-4.3  4.3.32-103443~Ubuntu~raring
virtualbox-5.0  5.0.26-108824~Ubuntu~trusty
So after exporting all installed VMs I wiped out Virtualbox and reinstalled it on Ubuntu 16.04 repos. After installation completed all VMs revives.

Then I imported 2 old VMs (running Ubuntu 14.04) on their .ova from my database, upgraded them to Ubuntu 16.04 and edited their /etc/network/interfaces as follow;

Code: Select all

auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet manual

# add bridge ports
auto br0
iface br0 inet static 
       address         192.xxx.xxx.xxx
       dns-nameservers 218.xxx.xxx.xxx 219.xxx.xxx.xxx
       network         192.xxx.xxx.xxx
       netmask         255.255.255.0
       broadcast       192.xxx.xxx.xxx
       gateway         192.xxx.xxx.xxx
       bridge_ports    eth0
       bridge_fd       9
       bridge_hello    2
       bridge_maxage   12
       bridge_stop     off
It comes to the present situation

I have tried editting /etc/resolvconf/resolv.conf.d/head
adding nameservers on the file

⟫ cat /etc/resolv.conf

Code: Select all

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameservers 218.xxx.xxx.xxx
namesergers 219.xxx.xxx.xxx
Re-started VMs. Situation remains the same, unable to ping domain, ping IP address without problem. VM can ping host IP add and vice versa.

Regards
satimis
Last edited by socratis on 23. May 2017, 03:00, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Guest can't connect to Internet

Post by socratis »

  1. Only the downloads from the VirtualBox website are supported.
  2. This is not a VirtualBox issue as I said, it's a Linux configuration issue. Treat it as such.
  3. There are too many xxx.xxx.xxx for me to continue in this discussion. I will let someone else handle it.
  4. Please, do not use the "Quote" button, unless you want to quote specific parts of the previous message. Use the "Post Reply" instead. It makes the conversation more compact and coherent.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
satimis
Posts: 506
Joined: 12. Jun 2007, 03:41

Re: Guest can't connect to Internet

Post by satimis »

Hi socratis,

Your advice noted.

There is nothing to do with configuration. The entries on /etc/network/interfaces are correct. Unfortunately I made a typing mistake on following line;

Code: Select all

......
dns-nameservers 218........ 219.........
.....
changed dns-nameservers to dns-nameserver and rebooted VM. Then VM can ping domain

Thanks

Regards
satimis
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Guest can't connect to Internet

Post by socratis »

Good. As I said from the first post, this is NOT a VirtualBox problem. Just because an OS is running under VirtualBox, does not mean it is a VirtualBox problem. Try to remember that in the future... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply