A reboot wiped the content of /etc/resolv.conf after configuring dns=none in NetworkManager.conf
Environment
- Red Hat Enterprise Linux (RHEL) 7
- Red Hat Enterprise Linux (RHEL) 8
- NetworkManager
Issue
- On a RHEL 7 and RHEL 8 server using
NetworkManager, configuring the directivedns=nonein/etc/NetworkManager/NetworkManager.confand immediately rebooting the server results in a wipe of the pre-existing content of/etc/resolv.conf.
Resolution
-
Restart the
NetworkManagerservice before rebooting the server:# systemctl restart NetworkManager.service
Root Cause
- Without a restart of the
NetworkManagerservice the directivedns=noneis still not in use in the loaded configuration. NetworkManagerwill update the content of/etc/resolv.confas part of its default behavior during the shutdown procedure.
SBR
Product(s)
Components
Category
Tags
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.