VMware Fusion Network Settings – Part 1

Introduction

One of the areas that has been simplified in the first release of VMware Fusion is the configuration of the virtual network settings. Similar to the Windows and Linux hosted variants of VMware products, there are 2 network interfaces setup during the installation of Fusion, plus a bridge from Fusion to the computer’s active NIC. The 2 virtual network cards that are configured are the host- only network, vmnet1, and the NAT network interface, vmnet8. To learn more about these configurations I would suggest that the documentation for VMware Workstation 6 networking is read, as Fusion is derived from the same codebase. See the VMware Workstation 6 online manual and specifically the section on “Configuring a Virtual Network”, and especially the parts relating to Linux.
What Fusion doesn’t easily let you do is manually configure the IP address ranges used by vmnet1 and vmnet8, or add additional virtual networks; e.g. vmnet2, etc. This first article demonstrates how to change the Fusion network settings, allowing the IP address range to be specified for the default connections. Before we start the process we need to understand a few of the files used to configure Fusion. In the “/Library/Application Support/VMware Fusion/” directory are several files and sub- directories important to the Fusion application.

/Library/Application Support/VMware Fusion/

boot.sh Bash script used to start and stop VMware Fusion daemons and kexts.
config Holds vmnet1 subnet and mask settings
locations Installation database, settings, folders and files
vmnet-dhcp.conf Template for DHCP daemon configuration file
vmnet-nat.conf Template for NAT daemon configuration file
vmware-config-net.pl Perl script to configure Fusion

/Library/Application Support/VMware Fusion/vmnet1

dhcp.conf DHCP daemon configuration file

/Library/Application Support/VMware Fusion/vmnet8

dhcp.conf DHCP daemon configuration file
nat.conf NAT daemon configuration file
nat.mac MAC address used for NAT device

Step 1 – Reset Fusion Settings

Before you start, please ensure you have no running guests and that you have closed the fusion application. The first stage is to ensure we are at a known state with the various files used by Fusion. The simplest way to do this is to remove the “locations” file and re-run the Perl configuration script. Start a terminal session and then switch to the main directory for Fusion. We will then remove the file:

$cd /Library/Application\ Support/VMware\ Fusion/ 
$sudo rm locations

Next is to run the Perl configuration script, which will regenerate all the relevant files:

$sudo ./vmware-config-net.pl

You won’t need to answer any questions as the vmware-config-net.pl script auto answers them for you. Next we want to restart the services with these new values just to check that everything is working:

$sudo ./boot.sh --restart

Check that the network interfaces have been correctly configured:

$ifconfig -a

Note that your IP address ranges will almost certainly not match the ones in the sample output shown above. Don’t worry we are going to fix that with the next step.

Step 2 – Modify the IP address ranges

We should now have a clean “locations” file to work from. Using an editor, such as nano, open the file with write permissions via sudo or as root user, if you have enabled the account. Here nano is being run under sudo:

$sudo nano locations

This should bring up the nano editor screen.
We need to alter the following settings in the “locations” file:

  • VNET_8_HOSTONLY_HOSTADDR
  • VNET_8_HOSTONLY_NETMASK
  • VNET_1_HOSTONLY_HOSTADDR
  • VNET_1_HOSTONLY_NETMASK
  • VNET_1_HOSTONLY_SUBNET

Use Ctrl-O and Ctrl-X to save the file and exit nano.

Step 3 – Apply modified settings

Finally we run through the same sequence of commands as in Step 1 to apply the settings to Fusion. Firstly run the Perl configuration script, which will show slightly different output this time.

$sudo ./vmware-config-net.pl

Secondly, restart the Fusion daemons and kernel extensions, plus re-configure virtual NICs.

$sudo ./boot.sh --restart

Finally, we double check to see the virtual Ethernet cards are correctly configured.

$ifconfig -a

You should now be able to start Fusion and power on guests, and make use of the re-configured virtual networking. All this was tested on the release version of VMware Fusion 1.0 (build 51348). The test machine was running Mac OS X 10.4.10.
In the second part, I will be looking at how to add additional virtual adapters to Fusion.

Labels

vmware vmware Delete
fusion fusion Delete
network network Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.