A long time I wondered why I saw ESXi systems on my local network have two entries in their /etc/hosts file:
[root@ESXi-X10SRH-CF:~] cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost ::1 localhost.localdomain localhost 192.168.71.91 ESXi-X10SRH-CF ESXi-X10SRH-CF
Then I bumped into someone who had a different setup:
[root@ESXi-X10SRH-CF:~] cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost ::1 localhost.localdomain localhost 192.168.0.23 esxi.dynamic.ziggo.nl esxi
So now I knew that the first entry can have a domain resolving it (it still makes be wonder why ziggo is using a top-level domain to resolve local stuff; but searching for dynamic.ziggo.nl did not get me further on that).
So I installed a quick ESXi machine on that local network, and got the same.
When back home the machine still thought it was esxi.dynamic.ziggo.nl, though clearly I was outside a Ziggo network
I wanted to get rid of it, but that was hard.
Since I forgot to take screenshots beforehand, I can only provide the ones without a search domain bellow.
Reminder to self: visit someone within the Ziggo network, then retry.
Normally you can edit things like these in the default TCP/IP stack. There are two places to change this:
- Web interface, at 192.168.71.91/ui/#/host/networking/netstacks/defaultTcpipStack:
- The fields “Domain name” and “Search domains” are mandatory.
- DCUI, under “Configure Management Network”
Neither of these allowed me to change it to a situation like this, but luckily the console did.
In the below files, I had to remove the bold parts, then restart the management network (I did keep a text dump, lucky me):
[root@esxi:/etc] grep -inr ziggo . ./vmware/esx.conf:116:/adv/Misc/HostName = "esxi.dynamic.ziggo.nl" ./resolv.conf:2:search dynamic.ziggo.nl ./hosts:5:192.168.71.194 esxi.dynamic.ziggo.nl esxi [root@esxi:/etc] cat /etc/resolv.conf nameserver 192.168.71.3 search dynamic.ziggo.nl [root@esxi:/etc] cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost ::1 localhost.localdomain localhost 192.168.71.194 esxi.dynamic.ziggo.nl esxi
Future steps
- Read more on local domains, search domains and related topics
- Configure a local domain on my local network, so DHCP hands it out, and DHCP handed out host names are put in the local DNS
- Test if all services on all machines still work properly







