- vmware克隆报错Job for network.service failed because the control process
exited with error code
1.问题描述:克隆启动虚拟机以后,ifconfig后连ip地址都没了;
[root@centos7 ~]# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:8e:69:8c txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
重启网卡
[root@centos7 ~]# systemctl restart network
Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
2.解决方案;网上有很多说法,大多都是重新vim /etc/sysconfig/network-scripts/ifcfg-ens33 配置静态ip的, 也有说是mac地址问题,这些原因一一测试都排除了,其实是网卡不工作了,最后只有一种方法管用,关闭NetworkManager
临时关闭
systemctl stop NetworkManager
永久关闭
systemctl disable NetworkManager
重启
systemctl restart network
再次查看
[root@centos7 network-scripts]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.101 netmask 255.255.255.0 broadcast 192.168.10.255
inet6 fe80::20c:29ff:fec7:5224 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:c7:52:24 txqueuelen 1000 (Ethernet)
RX packets 15 bytes 1114 (1.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 36 bytes 4794 (4.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:8e:69:8c txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
3.原因
在CentOS系统上,目前有NetworkManager和network两种网络管理工具。如果两种都配置会引起冲突。由于一般我们都是使用 network 配置静态ip,可能是克隆导致NetWorkManager自动配置,具体原因不清楚,发生了冲突,所以把它禁用掉就好了。
4.感谢阅读,如果能帮到您,是我的荣幸