Ticket #10640 (new defect)
Opened 22 months ago
NAT relies on /etc/resolv.conf
|Reported by:||tigris666||Owned by:|
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?