Centos6.5 克隆之后,重启网卡报错 No suitable device found: no device found for connection 'System eth0

一、场景:Centos6.5 克隆之后,重启网卡报错  No suitable device found: no device found for connection 'System eth0'.

查看网卡: ifconfig  (克隆过来的网卡由 eth0变为了eth1)

[root@bogon ~]# ifconfig
eth1      Link encap:Ethernet  HWaddr 00:0C:29:E8:A7:9A  
          inet addr:192.168.0.107  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fee8:a79a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:87 errors:0 dropped:0 overruns:0 frame:0
          TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:9825 (9.5 KiB)  TX bytes:7458 (7.2 KiB)

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:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 

二、解决方案:

1、删除旧虚拟机的网络配置文件,重启服务器:

rm -f /etc/udev/rules.d/70-persistent-net.rules

reboot

2、若修改为静态ip地址,需要修改  eth0网卡配置文件(Mac地址用ifconfig命令查出来的 Mac):

Centos6.5 克隆之后,重启网卡报错  No suitable device found: no device found for connection 'System eth0

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

DEVICE="eth0"
BOOTPROTO="static"
HWADDR="00:0C:29:E8:A7:9A"
IPADDR=192.168.0.121
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
IPV6INIT="yes"NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="f77f64a8-e244-4cc1-bcb9-075c513e934f"

3、重启服务: service  network restart

Centos6.5 克隆之后,重启网卡报错  No suitable device found: no device found for connection 'System eth0

Centos6.5 克隆之后,重启网卡报错  No suitable device found: no device found for connection 'System eth0

 

上一篇:python写文件时遇到UnicodeEncodeError: 'gbk' codec can't encode character...时处理办法


下一篇:Go 错误处理总结与实践