@a.p. "edit the vmnetdhcp.conf"
Thanks a.p. That is the solution. I made a cheet sheet for myself and post it here.
Start CentOS or RHEL (or other Linus as far as I know)
Locate hardware address before editing files below
--------------------------------------------
sudo ifconfig |grep HW
eth0 Link encap:Ethernet HWaddr 00:0C:29:BF:20:9C
Edit C:\ProgramData\VMware\vmnetdhcp.conf
-----------------------------------------
It is easy to choose a constant IP address with VMware virtual DHCP server. It will always give your VM the same IP if you make changes below. This allows serveral VMs to share a copy of the same /etc/hosts file and allow you to setup a little virtual network with VMs like database server, web server, development workstation, etc.
Use the HWaddr from above to make an entry like below with your desired IP address (at the bottom of the file is best).
host developer1 {
hardware ethernet 00:0C:29:BF:20:9C;
fixed-address 192.168.11.130;
#hostname developer1.mydomain.com;
}
It is my experience that the name developer1 is not significant and that adding an entry like 'hostname developer1.mydomain.com;' to the entry has no real impact. Anyway, it is probably better to keep these details out of vmnetdhcp.conf which allows you to make these types changes from inside your VM(s).
Edit C:\ProgramData\VMware\vmnetdhcp.leases
-------------------------------------------
Find an entry in the file with your HWaddr and change the IP addrress to the one you selected in vmnetdhcp.conf above. If a client-hostname is in the lease entry it is coming from your Guest VM. If you set the name above then set it the same here.
lease 192.168.11.130 {
starts 0 2012/01/08 09:40:46;
ends 6 2012/01/21 09:40:46;
hardware ethernet 00:0c:29:bf:20:9c;
client-hostname "developer1.mydomain.com";
}
It is important to not have duplicate entries for any one 'hardware ethernet' option, so delete all except the one you just modified, and remove all entries that you know are bogus hardware addresses.
Shutdown all VMs at this point
Exit VMware Workstation
(I reboot my host computer as well because I am not sure if the VMware DHCP Server gets restarted)