How to set static ip address on vmware for NAT guest vms from an ubuntu Host dhcp server?
- by javadba
I need to configure various linux flavor NAT'ed guest vm's to have static ip addresses provided by the Ubuntu host.
The vmware documentation punts on this topic, deferring to "see the man pages for your linux distribution". But the generic pages for "my linux distro" do not know about the special stuff for vmware e.g. vmnet8.
Pointers from someone who just knows how to do this would be much appreciated.
Here is the /etc/vmware/vmnet8/dhcpd/dhcpd.conf:
allow unknown-clients;
default-lease-time 1800; # default is 30 minutes
max-lease-time 7200; # default is 2 hours
subnet 192.168.238.0 netmask 255.255.255.0 {
range 192.168.238.128 192.168.238.254;
option broadcast-address 192.168.238.255;
option domain-name-servers 192.168.238.2;
option domain-name localdomain;
default-lease-time 1800; # default is 30 minutes
max-lease-time 7200; # default is 2 hours
option netbios-name-servers 192.168.238.2;
option routers 192.168.238.2;
}
host vmnet8 {
hardware ethernet 00:50:56:C0:00:08;
fixed-address 192.168.238.1;
option domain-name-servers 0.0.0.0;
option domain-name "";
option routers 0.0.0.0;
}
Fromt the dhcpd.conf documentation, we are supposed to add an entry for static hosts similar to the following:
host mystatichostonee
{
hardware ethernet 00:20:6B:C7:9B:E4;
fixed-address 192.168.238.101;
}
host mystatichosttwo
{
hardware ethernet 00:23:7a:C7:9c:F2;
fixed-address 192.168.238.102;
}
But notice that the vmnet8 entry in the vmware-generated dhcpd.conf already is set to fixed-address. I don't know how to add the specifics for my hosts to that vmnet8 entry: do they become nested?