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
Note!! Please register for a free account to access the full content and also to participate in Q&A in the community

OCI: In Oracle Linux 7/CentOS 7 Instances, /etc/resolv.conf Gets Wiped After the First Reboot

Applies To:
Oracle Cloud Infrastructure
Oracle Linux Server release 7


Symptoms:

The /etc/resolv.conf file is wiped out after the first reboot in Oracle Linux 7 /CentOS 7

Cause
The /etc/resolv.conf file is being overwritten because NetworkManager is managing the DNS configuration instead of the cloud-init script.

Solution

  • Check the contents of /etc/resolv.conf and confirm that it is managed by the NetworkManager service.
[root@localhost  ~]# cat /etc/resolv.conf
# Generated by NetworkManager
search [DOMAIN_NAME]
nameserver 10.x.x.1
nameserver 10.x.x.2
options timeout:2
  • Add manage_resolv_conf: false in a custom configuration file, such as /etc/cloud/cloud.cfg.d/99-persist-resolv-conf.cfg

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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