Bringing up interface eth0: Error: No suitable device found: no device found for connection 'System eth0'. [FAILED]

created at 12-13-2021 views: 300

error

Configure the IP of the virtual machine to restart the network card: service network restart Error message:

The error message is as follows:

[root@localhost network-scripts]# vim ifcfg-eth0
[root@localhost network-scripts]# 
[root@localhost network-scripts]# service network restart
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  Error: No suitable device found: no device found for connection 'System eth0'.
                                                           [FAILED]

reason and solution

This problem occurs because the actual network card assigned to the virtual machine does not match the network card information in the configuration file.

1. The actual network card information allocated by the virtual machine is: [HWaddr 00:0C:29:7F:B6:FF]

root@localhost /]# ifconfig
eth1      Link encap:Ethernet  HWaddr 00:0C:29:7F:B6:FF  
          inet6 addr: fe80::20c:29ff:fe7f:b6ff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:68 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:7028 (6.8 KiB)  TX bytes:1620 (1.5 KiB)
          Interrupt:19 Base address:0x2024 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:48 errors:0 dropped:0 overruns:0 frame:0
          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3760 (3.6 KiB)  TX bytes:3760 (3.6 KiB)

2 The network card information in the configuration file is:

vim /etc/sysconfig/network-script/ifcfg-eth

DEVICE="eth0"
BOOTPROTO="static"
IPV4_FAILURE_FATAL="yes"
BOOTPROTO="dhcp"
HWADDR="00:0C:29:7F:B6:8A"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="5c4e89fb-eced-4d66-962a-e5f6e565ec26"
IPADDR="192.168.25.135"
NETMASK="255.255.255.0"
GATEWAY="192.168.25.1"
DNS1="192.168.25.1"

Modification method: The above configuration files are configured according to the actual network card configuration of the virtual machine, namely:

HWADDR="00:0C:29:7F:B6:8A" is modified to HWADDR="00:0C:29:7F:B6:FF"

Save and exit

Restart the network card: service network restart

created at:12-13-2021
edited at: 12-13-2021: