问题描述:今天使用xshell连接虚拟机,一直连接失败,电脑防火墙和虚拟机都关闭,且本机和虚拟机IP都无法ping的通。百度后看到网友的案例,试后成功解决问题。如下:
一:查看虚拟机IP显示如图,没有IP
在开机之后,发现网卡没有启动起来,进行了如下操作,还是不行
1、[root@localhost~]# ifup ens33
错误:激活连接失败:No suitable device found for this connection.
2、[root@localhost~]# 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
二.解决、先停止网卡,设置disable,然后启动,发现网卡启动了
[root@localhost~]# systemctl stop NetworkManager
[root@localhost~]# 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@localhost~]# service network restart
三.重启网络以后,输入IP addr 检验是否成功:
问题解决!xshell可以正常连接虚拟机,