Twitter

by acls us

VMware Fusion Virtual Network Configuration, 27 August 2010

 

Synopsis

CommuniG8 Limited is a small start-up IT consultancy.

In order to minimise the amount of hardware used, and where possible, we utilise Virtualisation in order to build test and and demonstration environments. VMware Fusion 3.1.1 on iMacs and MacBook Pros offers a high level of flexibility but is limited in the way that virtual networks can be configured. This article shows and example of a virtual network configuration that can not be created using the GUI tools provided.

 

Background

As part of a project to test building a Captive Portal for a Wireless Hotspot network, we needed to setup a virtual network with two Virtual Machines where one provided a DHCP Server that would be used by the other. We did not want this DHCP Server to start giving out IP configuration data on the real network so they couldn't be on the VMware "Bridged" network. Putting them on the "HostOnly" network was what we wanted but VMware had an internal DHCP Server on that network. So we needed to disable the internal DHCP Server.

 

VMware Fusion Configuration Data

All the configuration files we need to work with are in the "/Library/Application Support/VMware Fusion/" directory. The normal configuration provides a "Bridged" network (vmnet0), a "HostOnly" network with DHCP (vmnet1) and a "NAT" network with DHCP (vmnet8). The "HostOnly" and "NAT" networks are defined in a file called "networking" which normally looks like this;

 

VERSION=1,0

answer VNET_1_DHCP yes

answer VNET_1_DHCP_CFG_HASH E786BF3607C6FD89DDD48389A3FE8D87AFFEA3E1

answer VNET_1_HOSTONLY_NETMASK 255.255.255.0

answer VNET_1_HOSTONLY_SUBNET 192.168.253.0

answer VNET_1_VIRTUAL_ADAPTER yes

answer VNET_1_VIRTUAL_ADAPTER_ADDR 192.168.253.1

answer VNET_8_DHCP yes

answer VNET_8_DHCP_CFG_HASH AC1E8161C1E25634C8D273B7C293BF78DC9B5C98

answer VNET_8_HOSTONLY_NETMASK 255.255.255.0

answer VNET_8_HOSTONLY_SUBNET 192.168.117.0

answer VNET_8_NAT yes

answer VNET_8_VIRTUAL_ADAPTER yes

answer VNET_8_VIRTUAL_ADAPTER_ADDR 192.168.117.1

 

So, in order to get what we wanted we changed second line to "answer VNET_1_DHCP no", removed the third line  and also updated the VNET_1_HOSTONLY_SUBNET and VNET_1_VIRTUAL_ADAPTER_ADDR to match our virtual subnet. The updates file looks like this;

 

VERSION=1,0

answer VNET_1_DHCP no

answer VNET_1_HOSTONLY_NETMASK 255.255.255.0

answer VNET_1_HOSTONLY_SUBNET 192.168.1.0

answer VNET_1_VIRTUAL_ADAPTER yes

answer VNET_1_VIRTUAL_ADAPTER_ADDR 192.168.1.1

answer VNET_8_DHCP yes

answer VNET_8_DHCP_CFG_HASH C28A9F315A10D070AE0EB5B1390200881607FA1F

answer VNET_8_HOSTONLY_NETMASK 255.255.255.0

answer VNET_8_HOSTONLY_SUBNET 192.168.117.0

answer VNET_8_NAT yes

answer VNET_8_VIRTUAL_ADAPTER yes

answer VNET_8_VIRTUAL_ADAPTER_ADDR 192.168.117.1

 

VMware Fusion Virtual Network Creation

In order to update the running virtual network from the new definitions, we did this;

 

Make certain all VMs are shutdown and that the VMware desktop app is shutdown

cd "/Library/Application Support/VMware Fusion/"

sudo ./vmnet-cli -c

sudo ./vmnet-cli --start

 

Summary

There is no GUI support in VMware Fusion 3.1.1 for making alterations to the virtual networks. However, the above can be used to make a number of small configuration changes.

 

Contact

Richard Gate, CommuniG8 Limited
Ivy House
Rats Pen Lane
Castle Carlton
Louth

Lincolnshire
LN11 8JG

 

This email address is being protected from spambots. You need JavaScript enabled to view it.

 

08450 041715