1. First cancel the use of the VMware Dynamic Host Provisioning service
[Edit]-[Virtual Network Editor ...] Open the panel and select [VMnet8]. as follows, uncheck the [Use local DHCP service to distribute IP address to VMs] check.2. Configuration file Modification 3 configuration files are involved, the following/etc/sysconfig/network/etc/sysconfig/network-scripts/ifcfg-eth0/etc/resolv.conf specifically modify the following Gateway # gateways Boo Tproto # type modifies "DHCP" to "Static" IPADDR # requires a fixed ipnetmask # subnet Mask DNS1 # Dnsnameserver # This can be ignored[[email protected] ~]# cat /etc/sysconfig/networkNETWORKING=yesHOSTNAME=localhost.localdomainGATEWAY=192.168.78.2 [[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0"# BOOTPROTO="dhcp"BOOTPROTO="static"IPADDR=192.168.78.145NETMASK=255.255.255.0HWADDR="00:0C:29:DE:93:80"IPV6INIT="yes"NM_CONTROLLED="yes"ONBOOT="yes"TYPE="Ethernet"UUID="ba62d2e6-d078-4bb7-b8c4-d571a63ae836"DNS1=192.168.78.2 [[email protected] ~]# cat /etc/resolv.conf # Generated by NetworkManagernameserver 192.168.78.2[[email protected] ~]#
[Linux tips] Fix IP for CentOS under VMware