Changes to ESXi 7.0 U3 hosts /etc/hosts or /etc/resolv.conf revert after reboot
search cancel

Changes to ESXi 7.0 U3 hosts /etc/hosts or /etc/resolv.conf revert after reboot

book

Article ID: 318036

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction


Customer might rely on the behavior that directly modify /etc/hosts and /etc/resolv.conf, can be persistent across reboot.


Symptoms:

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.

For /etc/hosts, following is supported:

esxcli network ip hosts list
esxcli network ip hosts add
esxcli network ip hosts remove


For /etc/resolv.conf, following is supported:

  • Configure the resolv.conf File by Using esxcli Commands

https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/7-0/vsphere-networking-7-0.html

esxcli network ip dns server add

  • VIMAPI

https://vdc-download.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.host.DnsConfig.html

  • Configure with DCUI

Configuring VMware ESXi Management Network from the direct console

https://knowledge.broadcom.com/external/article/328870/

Environment

VMware vSphere ESXi 7.0.3

Resolution


From 7.0 U3 on, content of  /etc/hosts and /etc/resolv.conf are moved to configstore.


Workaround:

There is no workaround available. 
 


Additional Information