There’s a time you want to use fixed address even for your NATed VM guest. In the case of VMware, you can achieve this by modifying configuration file in ‘/Library/Preferences/VMware Fusion/vmnet8’. vmnet8 is the virtual interface for NATed guests. You can find what ranges are currently applied for this virtual guests by checking dhcpd.conf.
$ cat '/Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf' ... subnet 192.168.210.0 netmask 255.255.255.0 { range 192.168.210.128 192.168.210.254; option broadcast-address 192.168.210.255; option domain-name-servers 192.168.210.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.210.2; option routers 192.168.210.2; } ...
To set specific IP for a guest, you should check guest’s MAC address first. You can find it in the guest’s settings button or by running ‘ifconfig’ from the guest. In this case, I want to use 192.168.210.134 for my guest. So, I added the below lines in dhcpd.conf.
$ sudo vi '/Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf' ... host ubuntu64-vm { hardware ethernet 00:0C:29:CC:A4:96; fixed-address 192.168.210.134; }
Some document says it will be applied when you restart VMWare Fusion, but in my case, I had to restart the Mac.
Leave a Reply