Linux 重启网卡错误:连接激活失败:No suitable device found for this connection (device virbr0 not available because profile is not compatible with device (mismatching interface name)).
安装的vmvare虚拟机,在/etc/sysconfig/network-scripts/ifcfg-ensxxx中配置了静态IP后,安装的相关服务或应用通过静态IP访问正常;
但是有时候在虚拟机挂起或关机后,再次重启该虚拟机后,查看虚拟机服务器IP发现之前配置的IP地址未生效,使用ifup再次开启网卡提示:
错误:连接激活失败:No suitable device found for this connection (device virbr0 not available because profile is not compatible with device (mismatching interface name)).
检查发现是未配置网卡MAC地址。
解决步骤:
1.执行ip addr 查看网卡MAC地址:
找到对应网卡里 link/ether后的这一串就是该网卡MAC地址
2.在网卡配置中添加MACADDR=“MAC地址”
在/etc/sysconfig/network-scripts/ifcfg-ensxxx中添加对应的MAC地址
添加完成后重启下NetworkManager即可
(systemctl restart NetworkManager)