修改IP(NAT模式)
vi /etc/sysconfig/network-scripts/ifcfg-ens33
IPADDR="192.168.10.130" PREFIX="24" GATEWAY="192.168.10.2" DNS1="192.168.10.2" DOMAIN="localdomain" IPV6_PRIVACY="no"
网关IP可在虚拟机网络编辑器中查看:
修改 resolve.conf
vi /etc/resolv.conf
# Generated by NetworkManager search localdomain nameserver 192.168.10.2