今天重新装了几台虚拟机,克隆后就这样了
[root@llq-control ~]# systemctl start network
Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
[root@llq-control ~]# systemctl status network
● network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since 日 2022-09-19 22:44:34 CST; 1s ago
Docs: man:systemd-sysv-generator(8)
Process: 5042 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
9月 29 22:44:34 llq-control network[5042]: RTNETLINK answers: File exists
9月 29 22:44:34 llq-control network[5042]: RTNETLINK answers: File exists
9月 29 22:44:34 llq-control network[5042]: RTNETLINK answers: File exists
9月 29 22:44:34 llq-control network[5042]: RTNETLINK answers: File exists
9月 29 22:44:34 llq-control network[5042]: RTNETLINK answers: File exists
9月 29 22:44:34 llq-control network[5042]: RTNETLINK answers: File exists
9月 29 22:44:34 llq-control systemd[1]: network.service: control process exited, code=exited...s=1
9月 29 22:44:34 llq-control systemd[1]: Failed to start LSB: Bring up/down networking.
9月 29 22:44:34 llq-control systemd[1]: Unit network.service entered failed state.
9月 29 22:44:34 llq-control systemd[1]: network.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
解决方法
1、关闭NetworkManager,并设置开启默认不启动该服务:
[root@llq-control ~]# systemctl stop NetworkManager
[root@llq-control ~]# systemctl disable NetworkManager
Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
2、重启network服务
[root@llq-control ~]# systemctl status network.service
● network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since 日 2022-09-19 22:53:32 CST; 9s ago
Docs: man:systemd-sysv-generator(8)
Process: 3620 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
如果发现还是报错,是MAC地址的问题
3、查询主机的硬件地址:
ip addr show
4、修改/etc/sysconfig/network-scripts/ifcfg-配置_1文件
第六步:再次重启网络
[root@llq-control ~]# systemctl restart network
[root@llq-control ~]# systemctl status network