How to disable NetworkManager in CentOS 8

To disable NetworkManager on CentOS 8, we need to install the network-scripts package which provides legacy support to the network service,

yum install network-scripts

Enable the service to start onboot,

systemctl enable network

Next, we add "NM_Controlled=no" to the interface config file,

nano /etc/sysconfig/network-scripts/ifcfg-<interface>

Replace with the interface name from ifconfig -a (or) ipaddr, for example in our case the interface is ens3

nano /etc/sysconfig/network-scripts/ifcfg-ens3

Add the following line to the last line of the ifcfg-ens3 config file,

NM_CONTROLLED="no"

Next, Stop and Disable the NetworkManager service,

systemctl stop NetworkManager
systemctl disable NetworkManager

Restart the network now via the "network" service,

service network restat

At this point, you will see the following information,

WARN : [network] You are using 'network' service provided by 'network-scripts', which are now deprecated.

WARN : [network] 'network-scripts' will be removed in one of the next major releases of RHEL.

WARN : [network] It is advised to switch to 'NetworkManager' instead for network management.
Restarting network (via systemctl):                        [  OK  ]

Enable the network service to start onboot,

systemctl enable network

After which you should get the following output,

network.service is not a native service, redirecting to systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable network

You may reboot your VPS to test if the network comes alive on it's own via the Network service automatically onboot.

Done!