-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generic/debian boxes have fixed DNS servers when used in Vagrant with libvirt #282
Comments
And I just noticed that the workaround is not sufficient if you're trying to use synced folders of type nfs instead of rsync. The setup process tries to install the necessary NFS client packages but fails because the download servers cannot be resolved. This happens before the bootstrap script gets started. |
Oh, I forgot to add version information. All of the boxes were version 4.2.16, pulled via Vagrantfile. |
It's been awhile since I tried using the DNS servers provided over DHCP. I can recall at least two issues: Some of the box configs would fail to build because a locallly provided DNS servers might respond with an IPv6 addresses, even though the host/guest didn't support v6. As I recall the Ubuntu installers on Hyper-V were particularly fragile. The second issue was some of the unit tests I run on the Magma version of the boxes require a DNS server to be conformant when handling specific scenarios, like a domain name being invalid. And sometimes DNS servers would violate these rules. For example a consumer ISP might redirect any invalid DNS names to its own servers. This caused spurious test failures. All that being said, I've slowly been migrating newer box configs over to only using the hardcoded servers as a fall back. If I haven't already, we can try updating the Debian 11/12 configs to start with and see what breaks. |
Isn't this a duplicate of #54? |
The Generic Debian boxes (all major releases 8 through 11) have fixed DNS resolvers instead of using DHCP to get the list of nameserver entries.
I'm using Vagrant 2.3.7 with the libvirt provider. The host machine is running Ubuntu 22.04 on amd64.
After
vagrant up
the file/etc/network/interfaces
looks like this:and
/etc/resolv.conf
looks like this:This is the case for all generic/debian* boxes. The other boxes I'm currently using don't have this problem (generic/ubuntu20 and 22, and generic/centos7). With the other boxes the above IP addresses can still be found in the config files, but they seem to get overwritten before the bootstrap process.
Since external DNS servers are blocked in my place of work I can't use these boxes as-is at the moment. (Never mind the privacy implications of pushing third-party DNS resolvers on others.)
As a workaround I have put the following line into my bootstrap script. Replace the search domain and nameserver IP address as needed:
It would be nice if you could remove these fixed DNS server addresses.
That said, many thanks for providing all these boxes! They are very useful to me.
The text was updated successfully, but these errors were encountered: