This posting comes strictly from the land of esoteria. We have a Vagrant + Virtualbox environment that sets up Foreman used for PXE booting baremetal servers. The environment work fine on Linux and MacOS. But we needed to make this environment work also on Windows. Easy, right? Vagrant and Virtualbox are supposed to abstract all those pesky operating system settings away, correct? After resolving a non-Windows related challenge provisioning of Foreman on Windows almost worked. Except that it failed when foreman-installer attempted to start[*]. The error message was this:
Forward DNS points to 127.0.1.1 which is not configured on this server
The error message can be traced back to a Kafo pre-install hook called dns.rb. What happens is that Ruby compares IP addresses fetched from /etc/hosts and compares them to IP addresses of network interfaces that are present. If there is a mismatch the error message above is displayed.
In case of Windows Vagrant created "127.0.1.1 foreman.example.org" entry in /etc/hosts on the VM. Unfortunately no interface in that Linux VM had the IP 127.0.1.1, so foreman-installer pre-install check was doomed to fail. This feature in Vagrant is considered by some - and not without merit - a misfeature. In Linux and MacOS the hosts entry on the VM reads "127.0.0.1 foreman.example.org" instead, which does not trigger this issue because it matches the IP of the loopback interface. The workaround is to get rid of the offending /etc/hosts entry in a provisioning script before foreman-installer launches.
While this error was noticed in Vagrant it is quite possible that it manifests itself on real systems with misconfigured /etc/hosts file as well.
[*] Foreman-installer uses Kafo, just like our Puppetmaster installer and Configuration Manager Image built on top of it.