2015年11月13日 星期五

Setup VM's static IP with VMWare Workstation 12 Player

I was intended to setup a hadoop cluster using VMWare.  But setting up a static IP to a VM is kind of hard.  I felt hard to understand what the networking structure provided by VMWare.


After researching on web, this works with VMWare Workstation 12 Player
Reference: https://bytealmanac.wordpress.com/2012/07/02/assigning-a-static-ip-to-a-vmware-workstation-vm/

Here is how.

1. Open the following file as Administrator.  Not that the path is not "Program File"
C:\ProgramData\VMware\vmnetdhcp.conf
2.  Append the text at the end of the file, and close it.  Texts marks as red are things you should modify.  The MAC address can be found inside the setting of the VM.
host hdp000 {
hardware ethernet 00:0C:29:E9:CF:61;
fixed-address 192.168.162.140;
}
3. Restarting the dhcp service of VMWare with the following commands.  The command should be executed with the Administrator
net stop vmnetdhcpnet start vmnetdhcp
That's all.  The easiest way to configure so far.