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

一、说明:虚拟机配置IP 重启网卡:service network restart 报错信息:

      报错信息如下:

[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]

二、发生此问题是由于虚拟机实际分配到的网卡与配置文件中的网卡信息不匹配造成

1、 虚拟机实际分配网卡信息为:【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、配置文件中网卡信息为:

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

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"

三、修改方式:以上配文件按照虚拟机实际分配到的网卡配置,既:

HWADDR="00:0C:29:7F:B6:8A"修改成HWADDR="00:0C:29:7F:B6:FF"
保存对退出: 重启网卡:service network restart 正确

 

posted @ 2021-12-13 13:13  东北大亨  阅读(350)  评论(0)    收藏  举报