Monday, August 25, 2014

How to give virtual machines in Fusion static IP addresses

An interesting post related to OpenStack shows how to give a virtual network adapter in a VM a static IP address assignment with VMware Fusion.

http://docs.openstack.org/developer/sahara/devref/devstack.html#setting-fixed-ip-address-for-vmware-fusion-vm

I'm going to copy the content here just in case that page disappears in the future:

Setting fixed IP address for VMware Fusion VM

  1. Open file /Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf
  2. There is a block named “subnet”. It might look like this:
subnet 192.168.55.0 netmask 255.255.255.0 {
        range 192.168.55.128 192.168.55.254;
  1. You need to pick an IP address outside of that range. For example - 192.168.55.20
  2. Copy VM MAC address from VM settings->Network->Advanced
  3. Append the following block to file dhcpd.conf (don’t forget to replace VM_HOSTNAME andVM_MAC_ADDRESS with actual values):
host VM_HOSTNAME {
        hardware ethernet VM_MAC_ADDRESS;
        fixed-address 192.168.55.20;
}
  1. Now quit all the VmWare Fusion applications and restart vmnet:
$ sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop
$ sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start
  1. Now start your VM, it should have new fixed IP address


No comments:

Post a Comment