Adding a network device to CentOS 8 on Hyper-V does not automatically create a virtual network interface

problem

--In this way, even if you add a network interface after creating the OS, it will not be automatically recognized. image.png

Make with nmcli

nmcli connection add type ethernet ifname eth1 con-name eth1
nmcli connection modify eth1 ipv4.address 172.16.0.2/24
nmcli connection modify eth1 ipv4.method manual
nmcli connection up eth1

Confirmation

[root@aaaa ~]# ip a 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:15:5d:0b:c9:05 brd ff:ff:ff:ff:ff:ff
    inet 192.168.11.208/24 brd 192.168.11.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 240d:1a:76e:800:5397:a6f9:8481:e895/64 scope global dynamic noprefixroute 
       valid_lft 7502sec preferred_lft 7502sec
    inet6 fe80::5854:f022:4e88:61d1/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:15:5d:0b:c9:0a brd ff:ff:ff:ff:ff:ff
    inet 172.16.0.2/24 brd 172.16.0.255 scope global noprefixroute eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a1c2:78aa:a19f:5a48/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

Recommended Posts

Adding a network device to CentOS 8 on Hyper-V does not automatically create a virtual network interface
How to add a virtual disk to Linux (CentOS7) on VirtualBox to free up space
How to place a button that does not move by scrolling on TableView etc.
[Introduction] Try to create a Ruby on Rails application
Let's create a gcloud development environment on a centos8 container
Create a user with an empty password on CentOS7
Steps to set up a VNC server on CentOS 8.3
Environment construction for OSS-DB Silver # 2_Preparation 1-Create a user account to operate PostgreSQL on CentOS7