You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

PRESERVE_HOSTINFO=2 in /etc/oci-hostname.conf Does Not Stop /etc/resolv.conf From Being Overwritten

edited Jun 30, 2022 1:48PM in Linux

An Oracle Linux instance has its /etc/resolv.conf files overwritten whenever it is rebooted or whenever its DHCP lease is renewed. In line with Oracle Cloud Infrastructure online help documentation, PRESERVE_HOSTINFO=2 has been set in /etc/oci-hostname.conf, however despite this setting being applied, /etc/resolv.conf continues to be overwritten whenever the DHCP lease is renewed or the instance is rebooted.

This issue can occur if the VCN's DNS settings are incorrect. There is also an omission in the Oracle Cloud Infrastructure online help documentation, and an unpublished documentation bug has been created in order to correct this. Please refer to the file /etc/oci-hostname.conf itself which documents the correct behaviour:

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!