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

Nameserver entries in /etc/resolv.conf reset on reboot

in Linux 2 comments

OCI VM

Oracle Linux Server 7.9

In my /etc/resolv.conf I have two instances of nameserver specified:

nameserver xx.xx.x.****
nameserver xx.xx.x.****

After a reboot, the /etc/resolv.conf resets to the default settings and replaces those with:

search vcn04251444.oraclevcn.com subnet04251444.vcn04251444.oraclevcn.com
nameserver 169.254.169.254


In the /etc/resolv.conf, it references https://docs.oracle.com/en-us/iaas/Content/Network/Tasks/managingDHCP.htm#notes. After looking in there I see that to preserve the /etc/resolv.conf changes I need to modify the /etc/oci-hostname.conf to be PRESERVE_HOSTINFO=2. However, even after I make the change, the nameserver entries still reset on reboot. I tried this with 

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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