Setup VMWare Fusion's vmnet8 network adaptor (NAT) to assign a specific ip on Mac OS X

August 28, 2010

I lost a 3 hours today to get VMware fusion's vmnet8 (NAT Adaptor) to assign a static ip for a specific guest host's network interface. Here is how to achieve that.

Configuration:

Host machine:

Network interface in the host machine:

Network interface in the guest host machine:

Setup VMware's vmnet8 to assign a particular ip to a specific guest host's network adaptor

In VMware Fusion, each vmware network adaptor (ex: vmnet8) used by the guest host has a custom dhcp configuration file which allows to customise the ip delivered to the guest host's network interface . This network configuration is found in the host machine at /Library/Application Support/VMware Fusion/ < vmnetx where x is a positive number > /dhcpd.conf.

Open this file and locate the line below.

####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" #######

Amend the following line:

host <guest host's hostname> {
    hardware ethernet <your guest host's network adaptor mac address>;
    fixed-address <'static' ip to assign to this network interface>;
}

Parameters explanation :

< guest host's hostname > - This is the hostname of the OS within the virtual machine.

< your guest host's network adaptor mac address > - This is the MAC address of network adaptor in the virtual which is binded to the vmnet8 network adaptor.

< 'static' ip to assign to this network interface > - This is the ip you want to always assign to the guest host's network adaptor.

Restart VMWare Fusion network services

The network configuration file has been modified. To take into account the changes, VMWare Fusion network service needs to be restarted. This can be done in tn Terminal with:

sudo ./Library/Application Support/VMware Fusion/boot.sh --restart

Make sure to request a new ip for the guest host network interface which will be the ip you define in the network configuration file.

Discussion, links, and tweets

I'm a developer at IO Stark.