由于我的虚拟机是从别的机器拷贝过来的,导入新机器后,没有问题,第二天就网络连接不上了,就出现下面的错误
[root@centos ~]# /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. [FAILED] [root@centos ~]# 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 Tue 2018-03-20 06:32:23 EDT; 23s ago Docs: man:systemd-sysv-generator(8) Process: 20428 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS) Process: 20597 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE) Mar 20 06:32:22 centos systemd[1]: Starting LSB: Bring up/down networking... Mar 20 06:32:22 centos network[20597]: Bringing up loopback interface: [ OK ] Mar 20 06:32:22 centos network[20597]: Bringing up interface eth0: Error: ...n. Mar 20 06:32:22 centos network[20597]: [FAILED] Mar 20 06:32:23 centos network[20597]: Bringing up interface eth1: Connect...9) Mar 20 06:32:23 centos network[20597]: [ OK ] Mar 20 06:32:23 centos systemd[1]: network.service: control process exited,...=1 Mar 20 06:32:23 centos systemd[1]: Failed to start LSB: Bring up/down netwo...g. Mar 20 06:32:23 centos systemd[1]: Unit network.service entered failed state. Mar 20 06:32:23 centos systemd[1]: network.service failed. Hint: Some lines were ellipsized, use -l to show in full.
百度了一大堆,都说是拷过来的时候mac地址的问题。
下面就提供了我解决问题的方法:
#关闭系统自带的NetworkManager这个管理套件就可以解决。 [root@centos ~]# systemctl stop NetworkManager [root@centos ~]# 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. [root@centos ~]# #重启网络 [root@centos ~]# /etc/init.d/network restart Restarting network (via systemctl): [ OK ]