I am facing a strange situation on all my RHEL 7 servers. All the RHEL 7 VMs are provisioned using a provisioning tool which connects to a VM offering a DHCP IP, once provisioning is complete we run a batch script to make the NICs static and update
resolv.conf with valid values.
But we can see that
/usr/sbin/dhcpclient-script is updating the
resolv.conf with its values.
Both NIC's config file has
PEERDNS=no and other required values.
I am not able to understand why
resolv.conf is modified by the DHCP server used for provisioning even after setting the NIC to static.