Error: Connection activation failed: The connection is not for this device.

Before performing the Linux settings, you must first configure VirtualBox. ¬†Enable a second Adapter, attached to the “Internal Network” as seen in the screenshot below

VM extra NIC settings

Now, when attempting to bring up a new NIC, and you receive the error: “Error: Connection activation failed: The connection is not for this device”. It could be because you are missing the NM_CONTROLLED field in your /etc/sysconfig/network-scripts/ifcfg-ethX file.

[root@Second ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
IPADDR=1.1.1.2
NETMASK=255.255.255.0
BOOTPROTO=static

Without the NM_CONTROLLED field, this is what happens:

[root@Second ~]# ifdown eth1; ifup eth1
Device state: 3 (disconnected)
Error: Connection activation failed: The connection is not for this device.

When I add the field,

[root@Second ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
IPADDR=1.1.1.2
NETMASK=255.255.255.0
BOOTPROTO=static
NM_CONTROLLED=no

It looks like this:

[root@Second ~]# !ifdown
ifdown eth1; ifup eth1
Determining if ip address 1.1.1.2 is already in use for device eth1...

No error message…. And lets check out interfaces..

[root@Second ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:7C:AF:92
inet addr:192.168.1.6 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe7c:af92/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:805 errors:0 dropped:0 overruns:0 frame:0
TX packets:463 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:82939 (80.9 KiB) TX bytes:84694 (82.7 KiB)

eth1 Link encap:Ethernet HWaddr 08:00:27:D1:3A:72
inet addr:1.1.1.2 Bcast:1.1.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fed1:3a72/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:23 errors:0 dropped:0 overruns:0 frame:0
TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4200 (4.1 KiB) TX bytes:8322 (8.1 KiB)

Nice…. I can ping my other VM

[root@Second ~]# ping 1.1.1.3
PING 1.1.1.3 (1.1.1.3) 56(84) bytes of data.
64 bytes from 1.1.1.3: icmp_seq=1 ttl=64 time=1.37 ms
64 bytes from 1.1.1.3: icmp_seq=2 ttl=64 time=0.192 ms
^C
--- 1.1.1.3 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1088ms
rtt min/avg/max/mdev = 0.192/0.781/1.371/0.590 ms

Sidebar