linux网络设置和虚拟机克隆转移之后Error:No suitable device found:no device found for connection 'System eth0'问题解决
原文:https://www.cnblogs.com/jay763190097/p/6015845.html
以root用户登录
#vi /etc/sysconfig/network-scripts/ifcfg-eth0
#编辑配置文件,添加修改以下内容
BOOTPROTO=static #启用静态IP地址
ONBOOT=yes #开启自动启用网络连接
IPADDR=192.168.21.129 #设置IP地址
NETMASK=255.255.255.0 #设置子网掩码
GATEWAY=192.168.21.2 #设置网关
DNS1=8.8.8.8 #设置主DNS
DNS2=8.8.4.4 #设置备DNS
IPV6INIT=no #禁止IPV6
保存退出
#:wq!
重启网络服务
#service network restart
虚拟机克隆etho网络问题恢复



查看当前网卡的mac地址和eth名称


修改vi /etc/sysconfig/network-scripts/ifcfg-eth0把mac地址修改为当前网卡的mac地址


这时service network restart就没问题了
如果想把eth名称改为eth0
vi /etc/udev/rules.d/70-persistent-net.rules


是名称和mac地址对应,然后重启即可