VirtualBox

Opened 12 years ago

Closed 8 years ago

#10640 closed defect (obsolete)

NAT relies on /etc/resolv.conf

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

Description

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 127.0.0.1, 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 (1)

comment:1 by aeichner, 8 years ago

Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use