Ticket #10640 (closed defect: obsolete)

Opened 7 years ago

Last modified 3 years ago

NAT relies on /etc/resolv.conf

Reported by: tigris666 Owned by:
Component: network/NAT Version: VirtualBox 4.1.16
Keywords: Cc:
Guest type: Linux Host type: Linux


I'm not filing this a major issue as it was just a deficiency I guess that I found when debugging something.

Basically, VirtualBox on a Linux host takes the nameservers from /etc/resolv.conf to pass onto the guest when using NAT. I assume it does some magic when one of those nameservers is, and it all works hunky dory, excellent job on that.

However, when using the resolvconf package, it is not required to have an /etc/resolv.conf file. You can setup resolvconf in a way that it creates a symlink for you, which AFAIK most distros will do this by default, but the host OS will still lookup DNS just fine without one. For example, the latest release of Linux Mint (maya / 13) on a default install does not have this symlink.

This in turn means VMs booted with NAT will not have DNS, since there was no /etc/resolv.conf file for VirtualBox to grok and offer that info to the guest via DHCP. I'm unsure how you are supposed to grok the DNS if it's not in a static file somewhere. There is some talk on the Mint forums that putting the symlink back in place would be a nice thing to do, but it had me wondering if maybe VirtualBox shouldn't rely on it being there if it's not a mandatory file.

Perhaps at a minimum, some kind of help/tooltip message when selecting NAT from the options if there is no /etc/resolv.conf file?

Change History

comment:1 Changed 3 years ago by aeichner

  • Status changed from new to closed
  • Resolution set to obsolete

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use