My Oracle Support Banner

Setting PRESERVE_HOSTINFO=2 in /etc/oci-hostname.conf Does Not Prevent /etc/resolv.conf to be Overwritten (Doc ID 2507035.1)

Last updated on MARCH 26, 2020

Applies to:

Oracle Cloud Infrastructure
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

 Manually change /etc/resolv.conf.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.