Setting PRESERVE_HOSTINFO=2 in /etc/oci-hostname.conf Does Not Prevent /etc/resolv.conf Overwrite
Applies to:
Oracle Cloud Infrastructure - Version N/A and later
Linux x86-64
Symptoms
On : OCI Linux instance
Setting PRESERVE_HOSTINFO=2 in /etc/oci-hostname.conf does not prevent /etc/resolv.conf to be overwritten at reboot or network restart.
The online help documents : https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/managingDHCP.htm?Highlight=dhcp%20options
Any changes you make to the /etc/hosts and /etc/resolv.conf files will be overwritten whenever the DHCP lease is renewed or the instance is rebooted. To persist your changes, add the following line to /etc/oci-hostname.conf:
PRESERVE_HOSTINFO=2
Changes
Tagged:
0