本文从问题的现状以及解决过程中问题查找以及问题解决进行描述,如下所示:
1.ping www.baidu.com上网失败
2.将虚拟机中安装好的centos网络设置成NAT
3.重启网络发现重启失败
报错有:“正在打开接口 ens33: 错误:激活连接失败:No suitable device found for this connection”以及“Failed to start LSB: Bring up/down networking”,如下所示
4.但是在虚拟机中安装好的centos后,不能上网ifconfig后没有ens33网卡,使用ifconfig -a查看主机上的网卡信息。
5.解决方案
step01:在终端窗口中输入命令,systemctl stop NetworkManager
step01:在终端窗口中输入命令,systemctl disable NetworkManager
step03:在终端窗口中输入命令,systemctl start network.service
step04:在终端窗口中输入命令,ifconfig,可以看到ens33网卡
step05:在终端窗口中输入命令,ping www.baidu.com,可以上网了