Customer might rely on the behavior that directly modify /etc/hosts and /etc/resolv.conf, can be persistent across reboot.
From 7.0 U3 on, content of /etc/hosts and /etc/resolv.conf are moved to configstore. They are no longer sticky bit file.
Direct update using text editor will not be Persistent across reboot. User should use public cli or API to update them.
Use the esxcli command to modify the contents of /etc/hosts and /etc/resolv.conf.
- For /etc/hosts, following is supported:
Configure the DNS Hosts File by Using ESXCLI Commands
esxcli network ip hosts list
esxcli network ip hosts add
esxcli network ip hosts remove
- For /etc/resolv.conf, following is supported:
1. Configure the resolv.conf File by Using esxcli Commands
esxcli network ip dns server add
2. Configure with DCUI
Configuring VMware ESXi Management Network from the direct console