In a nutshell:
I cannot see my newly added NIC with
nmtui on CentOS 8.
How can I resolve this?
I've installed a CentOS 8 VM on VirtualBox.
Usually I configure two NICs during the installation:
- One as NAT so it can connect to the outside network
- The other as Host Only so I can access it with internal IP
I didn't use Bridged network for I don't want to expose those VMs to the outside world.
It works well for all my VMs.
But when installing a new server I forgot to set a second NIC on VirtualBox during the OS installation, so I added a new NIC in VirtualBox after the installation.
Now I'm able to see the the newly added NIC with both
[root@cent8-4 ~]# ip addr 1: lo: ... 2: enp0s3: /*My working NIC*/ <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 08:00:27:de:33:18 brd ff:ff:ff:ff:ff:ff inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic noprefixroute enp0s3 valid_lft 84236sec preferred_lft 84236sec inet6 ... 3: enp0s8: /*The newly added NIC*/ <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 08:00:27:a7:c7:56 brd ff:ff:ff:ff:ff:ff 4: virbr0: ... 5: virbr0-nic: ...
[root@cent8-4 ~]# nmcli device DEVICE TYPE STATE CONNECTION enp0s3 ethernet connected enp0s3 /*My working NIC*/ virbr0 bridge connected virbr0 enp0s8 ethernet disconnected -- /*The newly added NIC*/ lo loopback unmanaged -- virbr0-nic tun unmanaged --
Note that enp0s3 is the NIC that I configured during the installation, while enp0s8 is the one that I added after the installation.
But when I use
nmtui to configure the IP address of the newly added NIC,
I just can't see it in "Edit a connection" screen:
Neither can I see it in "Activate a connection" screen:
So how can I make
nmtui recognize this new NIC?
Some articles say that I have to use "auto enp0s8" to initialize the NIC, but it seems that CentOS 8 doesn't have that tool:
[root@cent8-4 network-scripts]# auto enp0s8 bash: auto: command not found...