1、安装VM-Tools

VMware Workstation ---> VM ---> Reinstall VMware Tools

tar -zxvf ~/tools/VMwareTools-10.3.2-9925305.tar.gz -C /root/
~/vmware-tools-distrib/vmware-install.pl

2、Linux不休眠

vim /etc/systemd/logind.conf
HandleLidSwitch=lock

3、修改IP地址(静态)与DNS

vim /etc/sysconfig/network-scripts/ifcfg-ethXXXX
DNS1=114.114.114.114
BOOTPROTO=static
IPADDR=192.168.156.120
GATEWAY=192.168.156.2
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes

4、重启网络服务

service network restart

5、永久关闭防火墙和Selinux

systemctl stop firewalld.service
systemctl disable firewalld.service
chkconfig iptables off
setenforce 0
vi /etc/selinux/config
SELINUX=disabled

6、重启Linux

reboot

7、注意事项

(1)查看虚拟机网关与IP地址范围

VMware Workstation--->Edit--->Vitual Network Editor--->NAT VMnet8--->NAT Settings--->Gateway IP

VMware Workstation--->Edit--->Vitual Network Editor--->NAT VMnet8--->DHCP Settings --->Starting/Ending IP address

(2)修改虚拟机网关或IP

VMware Workstation--->Edit--->Vitual Network Editor--->Change Settings--->授权--->进入对应位置修改

(3)Linux的ip地址、网关的设置与虚拟机的网卡设置要相匹配


陈杨
12 声望3 粉丝

不闻不若闻之,闻之不若见之,见之不若知之,知之不若行之,学至于行而止矣;行之,明也!