Friday, 20 September 2013

Assign a static IP to a Guest on a VMware Workstation

SOURCE:
http://dvlancer.com/37-assign-a-static-ip-to-a-guest-on-a-vmware-workstation.html


Instructions on how to configure VMware built-in DHCP service to bind an IP to a MAC of a Guest VM running on a Windows host
Those instructions were tested on Windows 7 64bit as a host with VMware Workstation 8 and CentOS as a guest OS.
1. Open C:\ProgramData\VMware\vmnetdhcp.conf as Administrator. This file could also be located in C:\Documents and Settings\All Users\Application Data\VMware\ on Windows XP
vmnetdhcp.conf uses the same syntax as dhcpd.conf. Add host name, MAC and Static and static IP highlighted in the example below.
host centos {
  hardware ethernet 00:00:00:00:00:00;
  fixed-address 192.168.121.111;
}
The MAC of your guest system can be found in Virtual Machine Settings, under Advanced network settings.
VWMare Advanced network settings
2. Restart your computer or the VMware DHCP service. The VMware DHCP service can be restarted via services.msc or by running the following command via cmd (note you will need to run cmd as Administrator):
net stop vmnetdhcp
net start vmnetdhcp
3. Acquire a new IP on your guest OS by restarting it or using admin tools applicable to your guest OS.

No comments: