These scripts replace the default network configuration processing for VMware Fusion. New features are made available that match those found in the other hosted VMware products, such as Workstation and Server. The new capabilities introduced by these scripts are based on the functionality provided by VMware Workstation 6.0 for Linux. This includes the capability of:
Reference material for the use of this software can be found in documentation for the network configuration scripts for VMware Workstation 6.0 for Linux. This is available online at the VMware web site, and can also be downloaded in PDF format. Questions can be asked at the VMware Communities in the Fusion forum, and also check out the search facility to see if the question has been answered before.
The code is copyrighted Dave Parsons and also contains copyrighted VMware code. I must please ask that you do not re-post the code or modify without consulting me first. VMware kindly gave me explicit permission to re-distribute their code. I am happy to take feedback and any patches that may be useful to others.
Version | Feature |
2.0.0 | Fixed scripts to work on Fusion 1.1.3 and 2.0.0. |
1.0.3 | New "reapply" command to re-apply current settings. |
1.0.2 | Fixed issues where daemons stopped due to incorrect start/stop order. |
1.0.1 | Private test version. |
1.0.0 | Initial version. |
The current release of the VM@Work Tokamak scripts have been tested with the following releases of VMware Fusion:
Versions of Mac OS X were used during testing include:
o 10.5.4
o 10.5.5
Also you will need to be comfortable using the terminal to run bash and Perl scripts, plus running with root privileges. Running as root can be accomplished either with the "sudo" command or enabling the root account. The commands shown do not shown sudo on the command line for brevity.
Close VMware Fusion before doing any network changes!
Decompress the archive into a folder using Finder or the Terminal "gzip" command. Now all operations need to be carried out either using sudo or root account, as we will be modifying files owned by root. We need to setup the system to use the scripts as well as backup the existing configuration files. Open installation folder in the console and run the following command:
./tokamak.sh --install
You will get output similar to this, although there may be differences due to IP addresses and other machine specific network settings.
When the network settings are displayed, the script pauses for you to view the information. Press the "Esc" key to continue.
VM@Work Tokamak 2.0.0: Installer started
VM@Work Tokamak 2.0.0: Stop daemons and kexts
VM@Work Tokamak 2.0.0: Create backup folder
VM@Work Tokamak 2.0.0: Save original files
VM@Work Tokamak 2.0.0: Set boot script
You have already setup networking.
Would you like to skip networking setup and keep your old settings as they are?
(yes/no)
yes
VM@Work Tokamak 2.0.0: Display settings
The following virtual networks have been defined:
. vmnet1 is a host-only network on private subnet 192.168.48.0.
. vmnet8 is a NAT network on private subnet 192.168.197.0.
VM@Work Tokamak 2.0.0: Extended network scripting - Dave Parsons
Host-only/NAT networking on vmnet1 using
192.168.48.1/255.255.255.0 is running
DHCP server on vmnet1 is running
Host-only/NAT networking on vmnet8 using
192.168.197.1/255.255.255.0 is running
DHCP server on vmnet8 is running
NAT networking on vmnet8 is running
VM@Work Tokamak 2.0.0: Installer completed
During the installation existing network configuration is maintained, and a backup is stored in the "backup" folder. When uninstalling the software, your original files and network settings will be restored.
The main script is called "tokamak.sh" and has a variety of options:
VM@Work Tokamak 2.0.0
Usage: ./tokamak.sh {--install|--uninstall|--reinstall|--modify|--reset|--reapply|--display}
--install - setup the Tokamak replacement scripts and configure networks
--uninstall - remove the Tokamak replacement scripts and reset networks
--reinstall - reset and reinstall Tokamak
--modify - modify networks
--reset - reset and reconfigure networks
--reapply - reapply current configuration
--display - display current network settings
The network configuration is modified using the "tokamak.sh" command. Again this operation must be done with root privileges.
./tokamak.sh --modify
This will take you through the configuration of the network settings. At the end of the re-configuration the Fusion network components will be restarted. In this sample I am re-configuring the vmnet1 and vmnet8 IP addresses used.
You have already setup networking.
Would you like to skip networking setup and keep your old settings as they are?
(yes/no)
yes
n
Do you want networking for your virtual machines? (yes/no/help)
yes
y
Would you prefer to modify your existing networking configuration using the
wizard or the editor? (wizard/editor/help)
wizard
e
The following virtual networks have been defined:
. vmnet1 is a host-only network on private subnet 192.168.48.0.
. vmnet8 is a NAT network on private subnet 192.168.197.0.
Do you wish to make any changes to the current virtual networks settings?
(yes/no)
no
y
Which virtual network do you wish to configure? (0-99)
1
The network vmnet1 has been reserved for a host-only network. You may change it, but it is highly recommended that you use it as a host-only network. Are you sure you want to modify it? (yes/no)
no
y
What type of virtual network do you wish to set vmnet1?
(bridged,hostonly,nat,none)
hostonly
h
Configuring a host-only network for vmnet1.
The host-only network is currently configured to use the private subnet
192.168.48.0/255.255.255.0. Do you want to keep these settings?
yes
n
Do you want this program to probe for an unused private subnet? (yes/no/help)
yes
n
What will be the IP address of your host on the private network?
172.16.1.1
What will be the netmask of your private network?
255.255.255.0
The following virtual networks have been defined:
. vmnet1 is a host-only network on private subnet 172.16.1.0.
. vmnet8 is a NAT network on private subnet 192.168.197.0.
Do you wish to make additional changes to the current virtual networks settings?
(yes/no)
yes
y
Which virtual network do you wish to configure? (0-99)
8
The network vmnet8 has been reserved for a NAT network. You may change it, but it is highly recommended that you use it as a NAT network. Are you sure you want to modify it? (yes/no)
no
y
What type of virtual network do you wish to set vmnet8?
(bridged,hostonly,nat,none)
nat
n
Configuring a NAT network for vmnet8.
The NAT network is currently configured to use the private subnet
192.168.197.0/255.255.255.0. Do you want to keep these settings?
yes
n
Do you want this program to probe for an unused private subnet? (yes/no/help)
yes
n
What will be the IP address of your host on the private network?
172.16.8.1
What will be the netmask of your private network?
255.255.255.0
The following virtual networks have been defined:
. vmnet1 is a host-only network on private subnet 172.16.1.0.
. vmnet8 is a NAT network on private subnet 172.16.8.0.
Do you wish to make additional changes to the current virtual networks settings?
(yes/no)
yes
n
VM@Work Tokamak 2.0.0: Display settings
The following virtual networks have been defined:
. vmnet1 is a host-only network on private subnet 172.16.1.0.
. vmnet8 is a NAT network on private subnet 172.16.8.0.
VM@Work Tokamak 2.0.0: Extended network scripting - Dave Parsons
Host-only/NAT networking on vmnet1 using
172.16.1.1/255.255.255.0 is running
DHCP server on vmnet1 is running
Host-only/NAT networking on vmnet8 using
172.16.8.1/255.255.255.0 is running
DHCP server on vmnet8 is running
NAT networking on vmnet8 is running
There are many other things possible.
Do NOT remove the vmnet0, vmnet1 and vmnet8 adapters. Doing so will cause the VMware daemons for networking to fail. It is OK to change the IP addresses.
If you have added network adapters other than the defaults, which Fusion currently uses, you will need to edit the VMX file held in the "vmwarevm" package. To edit the VMX file, you can show the package contents in Finder, and edit using your favourite text editor. Alternatively use Eric Tung's VMX Extras editor. It can be found at:
http://communities.vmware.com/thread/92087
Once you have the file open you can then start adding parameters. For example if you have defined vmnet3, add these statements to the VMX file. Save and close the file, then fire up Fusion and check that the networking has worked.
ethernet1.present = "TRUE"
ethernet1.connectionType = "custom"
ethernet1.vnet = "VMnet3"
Picture of VMX editor:
To remove and rollback the settings to the original configuration run the following:
./tokamak.sh --uninstall
The original VMware Fusion settings will be restored and the network configuration reset to settings in place before Tokamak was used.
There are several other options that can be used with the main script.
VM@Work Tokamak 2.0.0: Display settings
The following virtual networks have been defined:
. vmnet1 is a host-only network on private subnet 172.16.1.0.
. vmnet8 is a NAT network on private subnet 172.16.8.0.
VM@Work Tokamak 2.0.0: Extended network scripting - Dave Parsons
Host-only/NAT networking on vmnet1 using 172.16.1.1/255.255.255.0 is running
DHCP server on vmnet1 is running
Host-only/NAT networking on vmnet8 using 172.16.8.1/255.255.255.0 is running
DHCP server on vmnet8 is running
NAT networking on vmnet8 is running
Thanks to Pat Lee, the Fusion Product Manager at VMware, for giving me the permission to re-distribute the modified code.
Thanks to Paul Rockwell for investigating and merging in the changes from Fusion 2.
Thanks to ActiveState for the great Komodo IDE product that makes debugging simple.
Finally thanks to the VMware Fusion team for a great product.
Contact details:
VMware Forums: DaveP
Web site: www.daveparsons.net
Thanks!!
I would like to create vmnet2 and vmnet3 and bridge them to en1 and en2. Now vmnet0 has been bridged to en0. By using tokamak script, it can allow me to modify vmnet1 and vmnet8 ip address, but I cannot find any option guiding me to create vmnet2 and vmnet3 and bridge them to en1 and en2 physical interface.
By following the "VMware Fusion (menu bar) > Help > VMware Fusion Help > Managing Virtual Machines > Configuring the Network Connection > Adding a Network Adapter", I have created two additional Network Adapter and I can also see two network-interface in VMWare XP. However, they were all bridged to en0. In VMX file, I can see below ethernet:
ethernet0.addressType = "generated"
ethernet0.connectionType = "bridged"
ethernet0.generatedAddress = "00:0c:29:e8:cf:19"
ethernet0.generatedAddressOffset = "0"
ethernet0.linkStatePropagation.enable = "TRUE"
ethernet0.pciSlotNumber = "33"
ethernet0.present = "TRUE"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet1.addressType = "generated"
ethernet1.connectionType = "bridged"
ethernet1.generatedAddress = "00:0c:29:e8:cf:23"
ethernet1.generatedAddressOffset = "10"
ethernet1.linkStatePropagation.enable = "TRUE"
ethernet1.pciSlotNumber = "37"
ethernet1.present = "TRUE"
ethernet1.wakeOnPcktRcv = "FALSE"
ethernet2.addressType = "generated"
ethernet2.connectionType = "bridged"
ethernet2.generatedAddress = "00:0c:29:e8:cf:2d"
ethernet2.generatedAddressOffset = "20"
ethernet2.linkStatePropagation.enable = "TRUE"
ethernet2.pciSlotNumber = "38"
ethernet2.present = "TRUE"
ethernet2.wakeOnPcktRcv = "FALSE"
I do not have to modify vmnet1 and vmnet8 ip address, but I need to bridge en1 and en2 to additional vmnet. So, here below are the two tasks I would like to accomplish:
1. How to create two additional vmnet? Can it be done by tokamak script?
2. How to bridge the created vmnet to en1 and en2? FYI.... en0 = onboard ethernet port, en1 = Airport wireless, en2 = USB-Ethernet
This apparently doesn't work with MacOS 10.5.8 / vmware 2.0.5. Posting here so people are cautioned.
After installing, I can't start my guests. I get these errors:
-
Could not open /dev/vmmon: No such file or directory.
Please make sure that the kernel module `vmmon' is loaded.
Failed to initialize monitor device
Cannot find a valid peer process to connect to
-
Donovan
After a lot of study of "VM@Work Tokamak.pdf" and trial, I discovered that I have to use "wizard" when I execute "sudo ./tokamak.sh --modify", which is something not documented, to add additional vmnet. Here below is the terminal output:
BMBP:tokamak200 boyce$ sudo ./tokamak.sh --modify
Password:
You have already setup networking.
Would you like to skip networking setup and keep your old settings as they are?
Do you want networking for your virtual machines? (yes/no/help) y
Would you prefer to modify your existing networking configuration using the
wizard or the editor? (wizard/editor/help) w
The following bridged networks have been defined:
. vmnet0 is bridged to en0
Do you wish to configure another bridged network? (yes/no) y
Configuring a bridged network for vmnet2.
Your computer has multiple ethernet network interfaces available: en2, en1.
Which one do you want to bridge to vmnet2? en1
The following bridged networks have been defined:
. vmnet0 is bridged to en0
. vmnet2 is bridged to en1
Do you wish to configure another bridged network? (yes/no) y
Configuring a bridged network for vmnet3.
The following bridged networks have been defined:
. vmnet0 is bridged to en0
. vmnet2 is bridged to en1
. vmnet3 is bridged to en2
All your ethernet interfaces are already bridged.
Do you want to be able to use NAT networking in your virtual machines? (yes/no)
Removing a NAT network for vmnet8.
This program previously created the directory /Library/Application
Support/VMware Fusion/vmnet8/, and was about to remove it. Since there are files
in that directory that this program did not create, it will not be removed.
Do you want to be able to use host-only networking in your virtual machines?
Removing a host-only network for vmnet1.
VM@Work Tokamak 2.0.0: Display settings
The following virtual networks have been defined:
. vmnet0 is bridged to en0
. vmnet2 is bridged to en1
. vmnet3 is bridged to en2
VM@Work Tokamak 2.0.0: Extended network scripting - Dave Parsons
Bridged networking on vmnet0 using en0 is running
Bridged networking on vmnet2 using en1 is running
Bridged networking on vmnet3 using en2 is running
However, as Dave has ever mentioned that it is not good to delete vmnet1 and vmnet8, so I run "sudo ./tokamak.sh --install" again.
BMBP:tokamak200 boyce$ sudo ./tokamak.sh --install
VM@Work Tokamak 2.0.0: Installer started
VM@Work Tokamak 2.0.0: Stop daemons and kexts
VM@Work Tokamak 2.0.0: Create backup folders
VM@Work Tokamak 2.0.0: Save original files
VM@Work Tokamak 2.0.0: Set boot script
You have already setup networking.
Would you like to skip networking setup and keep your old settings as they are?
Do you want networking for your virtual machines? (yes/no/help)
Would you prefer to modify your existing networking configuration using the
wizard or the editor? (wizard/editor/help)
The following bridged networks have been defined:
. vmnet0 is bridged to en0
. vmnet2 is bridged to en1
. vmnet3 is bridged to en2
All your ethernet interfaces are already bridged.
Do you want to be able to use NAT networking in your virtual machines? (yes/no)
Configuring a NAT network for vmnet8.
Do you want this program to probe for an unused private subnet? (yes/no/help)
'ping' -q -t 10 172.16.184.1 > /dev/null status = 2
The subnet 172.16.184.0/255.255.255.0 appears to be unused.
The following NAT networks have been defined:
. vmnet8 is a NAT network on private subnet 172.16.184.0.
Do you wish to configure another NAT network? (yes/no)
Do you want to be able to use host-only networking in your virtual machines?
Configuring a host-only network for vmnet1.
Do you want this program to probe for an unused private subnet? (yes/no/help)
'ping' -q -t 10 172.16.125.1 > /dev/null status = 2
The subnet 172.16.125.0/255.255.255.0 appears to be unused.
The following host-only networks have been defined:
. vmnet1 is a host-only network on private subnet 172.16.125.0.
Do you wish to configure another host-only network? (yes/no)
VM@Work Tokamak 2.0.0: Display settings
The following virtual networks have been defined:
. vmnet0 is bridged to en0
. vmnet1 is a host-only network on private subnet 172.16.125.0.
. vmnet2 is bridged to en1
. vmnet3 is bridged to en2
. vmnet8 is a NAT network on private subnet 172.16.184.0.
VM@Work Tokamak 2.0.0: Extended network scripting - Dave Parsons
Bridged networking on vmnet0 using en0 is running
Host-only/NAT networking on vmnet1 using 172.16.125.1/255.255.255.0 is running
DHCP server on vmnet1 is running
Bridged networking on vmnet2 using en1 is running
Bridged networking on vmnet3 using en2 is running
Host-only/NAT networking on vmnet8 using 172.16.184.1/255.255.255.0 is running
DHCP server on vmnet8 is running
NAT networking on vmnet8 is running
VM@Work Tokamak 2.0.0: Installer completed
BMBP:tokamak200 boyce$ ifconfig
lo0: flags=8049 mtu 1500
inet 172.16.125.1 netmask 0xffffff00 broadcast 172.16.125.255
ether 00:50:56:c0:00:01
After that, I started to use VMX Extras to modify the VMX file. Originally I did not pay attention that seting [ethernet1.connectionType = "custom"] is the key point to map vmnet to any ethernet specified in VMX file. So, I was failed originally. After some trials, I found that when I set [ethernet1.connectionType = "bridge"], VMware cannot recognize [ethernet1.vnet = "VMnet3"]. Only when I set it back to "custom", then it works. Here below is ethernet portion of my working VMX by adding and mapping additional two ethernet interface.
ethernet0.addressType = "generated"
ethernet0.connectionType = "custom"
ethernet0.generatedAddress = "00:0c:29:e8:cf:19"
ethernet0.generatedAddressOffset = "0"
ethernet0.linkStatePropagation.enable = "TRUE"
ethernet0.pciSlotNumber = "33"
ethernet0.present = "TRUE"
ethernet0.vnet = "VMnet0"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet1.addressType = "generated"
ethernet1.connectionType = "custom"
ethernet1.generatedAddress = "00:0c:29:e8:cf:23"
ethernet1.generatedAddressOffset = "10"
ethernet1.pciSlotNumber = "37"
ethernet1.present = "TRUE"
ethernet1.vnet = "VMnet2"
ethernet2.addressType = "generated"
ethernet2.connectionType = "custom"
ethernet2.generatedAddress = "00:0c:29:e8:cf:2d"
ethernet2.generatedAddressOffset = "20"
ethernet2.pciSlotNumber = "38"
ethernet2.present = "TRUE"
ethernet2.vnet = "VMnet3"
FYI..... en0 = Onboard Ethernet port, en1 = Airport Wireless port, en2 = Apple USB-Ethernet port
So, now I can feel free to connect my MacBook Pro VMWare image to three different physical subnets.
Hi
I cannot replicate your problem.
Dave
Do you mean when you setup below VMX config, your VMWare can still map the Ethernet0 to VMnet2?
ethernet0.addressType = "generated"
ethernet0.connectionType = "bridged"
ethernet0.generatedAddress = "00:0c:29:e8:cf:19"
ethernet0.generatedAddressOffset = "0"
ethernet0.linkStatePropagation.enable = "TRUE"
ethernet0.pciSlotNumber = "33"
ethernet0.present = "TRUE"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet0.vnet = "VMnet2"
From my testing, when I set connectionType to bridged, VMware always map the ethernet0 to vmnet0. Only when connectionType was set to custom, then ethernet.vnet = "VMnet2" can work.
By the way, firstly when I successfully map those ethernet to correct VMnet, I noticed from XP that their line rate was recognized as 10Mbps. I have to re-install VMware Tool again and select "Repair" so that all three interface line rate could be recognized as 1Gbps.
has there been any updates to this script for Snow Leopard?
Donovan
Any updates to support Snow Leopard yet ?
I just assume this version doesn't work as is
/G
I have upgraded to Snow Leopard for a month already. The script works find for me on either Fusion 2 as well as 3.
Looks great, but on Fusion 3.1.2 tokamak-config-net.pl fails as (atleast my copy of) 3.1.2 does not have a template for dhcpd.conf (/Library/Application Support/VMware Fusion/vmnet-dhcpd.conf does not exist) How should we modify for use with 3.1.2? Copy the file from vmnet1?:
Similarly trying to add a new network:
sudo ./tokamak.sh --modify
Password:
Unable to copy the source file /Library/Application Support/VMware
Fusion/vmnet-dhcpd.conf to the destination file /Library/Application
Support/VMware Fusion/vmnet1/dhcpd.conf.
Execution aborted.
VM@Work Tokamak 2.0.0: Display settings
The following virtual networks have been defined:
. vmnet1 is a host-only network on private subnet 192.168.160.0.
. vmnet8 is a NAT network on private subnet 172.16.53.0.
bVM@Work Tokamak 2.0.0: Extended network scripting - Dave Parsons
Host-only/NAT networking on vmnet1 using 192.168.160.1/255.255.255.0 is not running
DHCP server on vmnet1 is not running
Host-only/NAT networking on vmnet8 using 172.16.53.1/255.255.255.0 is running
DHCP server on vmnet8 is running
NAT networking on vmnet8 is running
Why does this seem so hard to configure in vmnets on snow-leopard:
hosts desired in 2 nets on one vmware-fusion:
1client: called lodi,
2routers: thor, odin
1server: tragedy
client lodi<------vlan1------>routers thor & odin<---------vlan2------->server tragedy
I tried to setup vmnet2 and vmnet3 and referencing them from tragedy-server vmachine-settings and lodi vmachine-settings is too easy to get wrong, no names, only types (nat, bridged, host-only). The manual edit of vmx file to set a custom is party successful, but I cant even setup 2 nets. The script helped to generate a new vmnet3, but I cant seem to succesfully get to any net except vmnet1 and vmnet8.
Does this require esx-server or windows/linux running vm player?
lodi/RHEL6.1Master.vmx:
[snip all but network]
ethernet0.present = "TRUE"
ethernet0.connectionType = "hostonly"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet0.addressType = "static"
ethernet0.pciSlotNumber = "33"
ethernet0.generatedAddressOffset = "0"
ethernet0.vnet = "vmnet1"
ethernet0.linkStatePropagation.enable = "FALSE"
ethernet0.bsdName = "en0"
ethernet0.displayName = "Ethernet"
ethernet0.address = "00:50:56:21:b2:a5"
ethernet1.present = "TRUE"
ethernet1.bsdName = "en1"
ethernet1.connectionType = "custom"
ethernet1.wakeOnPcktRcv = "FALSE"
ethernet1.addressType = "generated"
ethernet1.linkStatePropagation.enable = "TRUE"
ethernet1.generatedAddress = "00:0c:29:dd:05:6c"
ethernet1.pciSlotNumber = "37"
ethernet1.generatedAddressOffset = "10"
ethernet1.vnet = "vmnet3"
ethernet2.present = "TRUE"
ethernet2.bsdName = "en2"
ethernet2.connectionType = "bridged"
ethernet2.wakeOnPcktRcv = "FALSE"
ethernet2.addressType = "static"
ethernet2.linkStatePropagation.enable = "TRUE"
ethernet2.address = "00:50:56:36:58:b5"
ethernet2.vnet = "vmnet8"
ethernet2.pciSlotNumber = "38"