PRESERVE_HOSTINFO=2 in /etc/oci-hostname.conf Does Not Stop /etc/resolv.conf From Being Overwritten
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: