Oracle Linux 7 in OCI - do not modify /etc/resolv.conf
If you want to preserve /etc/resolv.conf configuration, following steps must be taken:
- include
PEERDNS=noin your/etc/sysconfig/network-scripts/ifcfg-<your_interface> - because initram rewrites
ifcfg-*files every time system reboots (and we would loose ourPEERDNS=nomodification), initramfs must be modified to exclude ifcfg modules. Executedracut -f -o ifcfg - every new kernel image modifies initram, therefore it is necessary to force dracut not to modify it even new kernel is installed. Place
90-dracut.conffile to/etc/dracut.conf.domit_dracutmodules+="ifcfg"
Now you can modify your /etc/resolv.conf and test the changes by rebooting/restarting network.