vmware fusion: how is the gateway IP decided in NAT networking mode?

5

1

I recently did a clean install from Mac OS X Snow Leopard to Mac OS X Lion.

I put all my Vmware Fusion guests in NAT mode with static IP'. All this time in Snow Leopard I had all my guest OS' referring to Mac OS X with a gateway IP: 172.16.224.4

A recent clean install to Lion also required a fresh install of Vmware Fusion. I brought back all my guest VMs without any change, but I could no longer ssh into them, because the gateway IP now had changed from 172.16.224.4 to 192.168.72.2. So I had manually change gateway IPs in all my guest VMs

It makes me wonder where are these settings stored which decides what would be the gateway IP of the host in NAT networking mode for Vmware Fusion?

Vaibhav Bajpai

Posted 2011-07-24T12:57:20.567

Reputation: 523

Answers

3

You can change the virtual network parameters in the /Library/Preferences/VMware Fusion/networking in Fusion 4 and 5. Earlier versions used /Library/Application Support/VMware Fusion directory. Here is an example:

VERSION=1,0
answer VNET_1_DHCP yes
answer VNET_1_DHCP_CFG_HASH E14991740B70D4718A6E5A90E94DE780DE461E09
answer VNET_1_HOSTONLY_NETMASK 255.255.255.0
answer VNET_1_HOSTONLY_SUBNET 192.168.232.0
answer VNET_1_VIRTUAL_ADAPTER yes
answer VNET_8_DHCP yes
answer VNET_8_DHCP_CFG_HASH C9AA06FAA43FDE1C5E8C4601E11A4F641720C662
answer VNET_8_HOSTONLY_NETMASK 255.255.255.0
answer VNET_8_HOSTONLY_SUBNET 192.168.133.0
answer VNET_8_NAT yes
answer VNET_8_VIRTUAL_ADAPTER yes

Usually it is enough to start Fusion to make the new settings active.

Laryx Decidua

Posted 2011-07-24T12:57:20.567

Reputation: 193

0

There's a whitepaper on how to do change these settings. In general, I look for things like this in the Fusion Power User's Guide

So that this answer isn't just a set of links, I'll provide some actual information. Fusion stores these settings in /Library/Preferences/VMware Fusion/networking. It is possible to change that file manually, reboot, and get the new settings, but that isn't recommended. There are configuration scripts to help you set things up the way you want. The reason the IP addresses changed is that on install, Fusion needs to establish two network interfaces, a host-only interface (typically called vmnet1) and a NAT interface (typically called vmnet8). Both of the interfaces get their own IP's (these IPs become the default gateway for your VMs) and DHCP configured to hand out addresses for you VMs. Fusion chooses these two IP ranges in a way that attempts to ensure they aren't already in use on your host as that would problems. On a fresh install of Fusion, it isn't uncommon for the auto-picked ranges for vmnet1 and vmnet8 to change.

kbyrd

Posted 2011-07-24T12:57:20.567

Reputation: 2 067