centos7 克隆后无法启动网络(service network restart) Restarting network (via systemctl)错误解决办法

[root@alex ~]# /etc/init.d/network restart
Restarting network (via systemctl): Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details. [失败]

"systemctl status network.service" and "journalctl -xe" and cat /var/log/message |grep network

[root@alex ~]#cat /var/log/message |grep network

Jan 2 20:01:58 localhost network: 正在打开接口 ens33-0101: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] ens33 设备的 MAC 地址与预期不符,忽略。
Jan 2 20:01:58 localhost /etc/sysconfig/network-scripts/ifup-eth: ens33 设备的 MAC 地址与预期不符,忽略。
Jan 2 20:01:58 localhost network: [失败]
Jan 2 20:01:58 localhost network: RTNETLINK answers: File exists
Jan 2 20:01:58 localhost network: RTNETLINK answers: File exists
Jan 2 20:01:58 localhost network: RTNETLINK answers: File exists
Jan 2 20:01:58 localhost network: RTNETLINK answers: File exists
Jan 2 20:01:58 localhost network: RTNETLINK answers: File exists
Jan 2 20:01:58 localhost network: RTNETLINK answers: File exists
Jan 2 20:01:58 localhost network: RTNETLINK answers: File exists
Jan 2 20:01:58 localhost network: RTNETLINK answers: File exists
Jan 2 20:01:58 localhost network: RTNETLINK answers: File exists
Jan 2 20:01:58 localhost systemd: network.service: control process exited, code=exited status=1
Jan 2 20:01:58 localhost systemd: Failed to start LSB: Bring up/down networking.
Jan 2 20:01:58 localhost systemd: Unit network.service entered failed state.
Jan 2 20:01:58 localhost systemd: network.service failed.
Jan 2 20:03:44 localhost systemd: Starting LSB: Bring up/down networking...
Jan 2 20:03:44 localhost NetworkManager[820]: <info> [1514894624.6962] ifcfg-rh: update /etc/sysconfig/network-scripts/ifcfg-ens33 (02afcad8-e36d-481f-8428-edb4a2fecc56,"ens33")
Jan 2 20:03:44 localhost NetworkManager[820]: <warn> [1514894624.6991] ifcfg-rh: cannot load /etc/sysconfig/network-scripts/ifcfg-ens33-0101 due to conflicting UUID for /etc/sysconfig/network-scripts/ifcfg-ens33 (02afcad8-e36d-481f-8428-edb4a2fecc56,"ens33")

 

1.首先克隆过来的MAC地址到新的虚拟机后会不一样,可先用ip addr查看本机MAC地址,再修改ifcfg-ens33里的HWADDR地址,两者要一致

2.从上面的提示可看出来,我的网卡配置文件为ifcfg-ens33,但由于更改前习惯于在当前目录下做了备份,此时只要把备份的文件“ifcfg-ens33-0101”删除或移至其他备份目录就解决问题了。

 

结果正常如下:

[root@alex network-scripts]# service network restart
Restarting network (via systemctl): [ 确定 ]

 

posted @ 2018-01-02 21:24  catsun  阅读(254)  评论(0)    收藏  举报