Could not activate connection: Connection 'ens33' is not available on device ens33 because device is strictly unmanaged

Latest response

Hi,

I have one RedHat8 virtual machine connected via bridge to my Wifi router, in order to have connection to outside.

The machine has an static IP configuracion settled in the /etc/sysconfig/network-scripts path as follows:

[root@system network-scripts]# cat ifcfg-ens33
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
IPV4INIT=yes
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
NAME=ens33
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.0.40
PREFIX=24
GATEWAY=192.168.0.1
DNS1=192.168.0.1
DOMAIN=example.com
IPV6INIT=no
UUID=c96bc909-188e-ec64-3a96-6a90982b08ad

But when I execute it appears that the the network devices ( indeed all of them) are strictly unmanaged:

[root@system network-scripts]# nmcli
virbr0: unmanaged
        "virbr0"
        bridge, 52:54:00:3C:B9:DD, sw, mtu 1500

ens33: unmanaged
        "Intel 82545EM"
        ethernet (e1000), 00:0C:29:1A:D0:D0, hw, mtu 1500

lo: unmanaged
        "lo"
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

virbr0-nic: unmanaged
        "virbr0-nic"
        tun, 52:54:00:3C:B9:DD, sw, mtu 1500

vnet0: unmanaged
        "vnet0"
        tun, FE:54:00:0A:5C:6D, sw, mtu 1500

I dont understand why because NetworkManager is up and running :

[root@system ~]# systemctl status  NetworkManager
● NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2021-08-24 23:50:48 CEST; 6min ago
     Docs: man:NetworkManager(8)

Also, I have tried to restart the service, but I have not succeeded

Later on, I have tried to changed this state using the GUI interface , executing nmtui comand, everything was indeed configured, but ,when I have tried to activate the connection, nmtui, warns me that I cannot:

Could not activate connection: Connection 'ens33' is not available on device ens33 because device is strictly unmanaged

What am I doing wrong?

I would appreciate if anyone could provide any help to solve this issue

Thanks in advance

Responses

If you've added the device ens33 to libvirt's network managent, that might affect NetworkManager's ability to manage the device. If so, remove the device from libvirt and hopefully NM will be able to pick it up with a restart of the NM service?

I also found this answer on Stackexchange where someone enabled management for the ifupdown plugin.

The accepted answer on that doesn't make sense to me, because the ifupdown ships with Debian/Ubuntu and not RHEL/CentOS, so I don't see how the accepted answer actually works at all (the poster was using CentOS 7).

But at least it gives a hint to check /etc/NetworkManager/NetworkManager.conf and /etc/NetworkManager/conf.d/ to see if there's a managed=false entry which could be changed.

Failing that, you could enable NetworkManager debugging and see if the additional logging gives a reason why the device is unmanaged.

I have had this problem where the NetworkManager (NM) shows the interface being in 'unmanaged' state even if I set it to be in managed state (nmcli device set eth0 managed yes). In the end, it turned out that it was the attribute 'NM_CONTROLLED' that needed to be set to 'yes' for the NM to manage the device. In my case, I am migrating from RHEL 7 to RHEL 9 and so I still have the old config, and so watch out for the NM_CONTROLLED flag if you encounter this issue.

It happened with me when I migrated my virtual machine to another hypervisor. All i did was following and all worked:

nmcli n off; nmcli n on

Perfect Kumar

It worked for me

Thanks

Great . HTH

Thanks Ravindra ,

the solution saved my day.

Thank you.

Great . HTH

Thank you so much Ravindra after wasting many days, this little thing worked for me.

Great . HTH

it's work Thanks Ravindra kumar

Just try this. It will work

nmcli n off
nmcli n on
nmcli
ens33: connected to ens33

Awesome :-)

Had the same issue in RHEL 9 on my Toshiba Laptop With the RHEL minimal installation, NetworkManager-wifi is not included.

nmcli connection up Airtel_kalyan

Error: Connection activation failed: No suitable device found for this connection (device lo not available because device is strictly unmanaged)

installed NetworkManager-wifi

dnf install NetworkManager-wifi systemctl reload NetworkManager systemctl restart NetworkManager nmcli connection up Airtel_kalyan

Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/3)