VM克隆虚拟机导致本地网络不可用

今天重新装了几台虚拟机,克隆后就这样了

[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)

929 22:44:34 llq-control network[5042]: RTNETLINK answers: File exists
929 22:44:34 llq-control network[5042]: RTNETLINK answers: File exists
929 22:44:34 llq-control network[5042]: RTNETLINK answers: File exists
929 22:44:34 llq-control network[5042]: RTNETLINK answers: File exists
929 22:44:34 llq-control network[5042]: RTNETLINK answers: File exists
929 22:44:34 llq-control network[5042]: RTNETLINK answers: File exists
929 22:44:34 llq-control systemd[1]: network.service: control process exited, code=exited...s=1
929 22:44:34 llq-control systemd[1]: Failed to start LSB: Bring up/down networking.
929 22:44:34 llq-control systemd[1]: Unit network.service entered failed state.
929 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

猜你喜欢

转载自blog.csdn.net/qq_16733389/article/details/126912535