I have installed three Linuxes on same laptop and same VirtualBox and this is my success ratio with DNS:

  • HortonWorks & CentOS. Worked for 5 minutes and never after that again. VM image reinstallation from scratch didn't help.
  • Talend, MapR & CentOS. Worked fine for a couple of days and then stopped working. First it stopped working everywhere except Firefox, and a few hours later Firefox stopped working as well. I know that Firefox has its own DNS cache, so I suppose it cached DNS server name or something like that for a while as well as it worked even for sites that I had never browsed.
  • Cloudera & RHEL/RedHat works perfectly all the time (with this issue, but it has some other issues).

Then /etc/hosts maintenance works differently also:

  • HortonWorks CentOS - works fine, no issues with it. This is the only way I get anything done despite the DNS issue.
  • Talend CentOS - it resets file immediately back. When I update the file with vi, vi complains that someone has changed the file already when I get to the point of saving my changes. And what "someone" is doing there is that this "nice" service is reverting it back constantly.

I haven't yet tried to revert back to previous snapshot with Talend CentOS as I am hoping to understand first what I did "wrong", so that I wouldn't repeat the same mistake and break the DNS service again. This is assuming that there is some logic as to when this gets broken and when it works.

I am using the only option that works at all with VirtualBox network settings: NAT. And yes, I do try to turn it off and on back again to fix it. And that helps to occasional problems when the Windows host has got a new network address (= every morning).

DHCP client id is empty in settings, so it should be default:

/sbin/dhclient -d -4 -sf /usr/libexec/nm-dhcp-client.action -pf /var/run/dhclient-eth0.pid -lf /var/lib/dhclient/dhclient-13e5cc85-010e-45e6-0000-f9b4015d5abc-eth0.lease -cf /var/run/nm-dhclient-eth0.conf eth0

DHCP settings (System Preferences --> Network Connections --> System eth0 --> Edit... --> IPv4 & IPv6) are by default set to (fully) automatic. I also tested to set with the localhost IP address found from /etc/hosts, DNS & gateway that I found with ipconfig -all (in Windows host) and with netmask But that didn't help.

If I kill DHCP kill 20610, then DNS works for perhaps 10 minutes until it fails again.

I found a clue. When DNS functions properly then /etc/resolv.conf file contents are

# Generated by NetworkManager
search local

# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com

And when DNS is broken, then same file has


Googling it up explained that this is DNS server of Google themselves and that is often used as a backup DNS server. So some service decides to use that address as DNS server for whatever reason and that doesn't work from my Windows host either. It is apparently blocked by the company I work in.

Copied/moved this discussion to CentOS site: https://www.centos.org/forums/viewtopic.php?f=16&t=47539&p=202100#p202100

  • Which dhcp client are you running on the various images, how is that dhcp client configured to handle DNS, also, which network manager (if any) are you using on the servers? – EightBitTony Jul 29 '14 at 9:40
  • It's only going to get from either your DHCP server(s) or static config. – EightBitTony Jul 29 '14 at 11:37
  • Plus -if you can't get to from your host, you'll never get to it from your VM. So you need to find out why you're getting inconsistent DHCP responses, or which DHCP server is giving out – EightBitTony Jul 29 '14 at 11:45
  • I should test the address from home, I suspect it works within USA only. If yes, that would certainly scope out my company. Then it leaves router manufacturer (CISCO?) and CentOS installers (MapR and Talend) to suspicion list. But my personal guess is CentOS (or RHEL), so I'll start digging this up from them first. – Timo Riikonen Jul 29 '14 at 12:09
  • works fine anywhere in the world - if you're doing the stuff above on your company network, then your company is blocking I run plenty of CentOS and RHEL under VirtualBox. VB is doing nothing with DHCP or DNS. You need to find out why your DHCP is being inconsistent. – EightBitTony Jul 29 '14 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.