VMware Communities
n0p
Contributor
Contributor
Jump to solution

Custom Virtual Networks under 3.1.1

As a follow on to a previous post, I am having problems getting custom vmnets working under v3.1.0 and above. I had a custom vmnet (vmnet2) that was created using tokamak300-20091029 for v3.0.2. When I upgraded to v3.1.1, my two VMs that were on vmnet2 (1 XP and 1 CentOS) both reported no link on that interface. This same problem is occurring on my Mac Pro running Leopard and my MacBook running Snow Leopard.

As suggested here, I uninstalled tokamak, uninstalled VMware (using /Library/Application\ Support/VMware\ Fusion/Uninstall\ VMware\ Fusion.app), rebooted, installed VMware v3.1.1, rebooted, verified normal networking worked as expected, manually configured vmnet2 in the networking file and verified the the .vmx files were correct. vmnet2 interfaces in both VMs still reported no link.

I followed the same process and installed v3.1.0 and got the same result (no link on vmnet2 interfaces). When I followed the process and installed v3.0.2, vmnet2 worked as expected.

Right now, my networking file has VNET_2 set like this:

answer VNET_2_DHCP no
answer VNET_2_HOSTONLY_NETMASK 255.255.255.0
answer VNET_2_HOSTONLY_SUBNET 10.20.30.0
answer VNET_2_VIRTUAL_ADAPTER no

I did try setting DHCP to yes and VIRTUAL_ADAPTER to yes as well, but it didn't change the outcome.

My vmx files for that interface are configured like this:

ethernet0.addressType = "generated"
ethernet0.pciSlotNumber = "33"
ethernet0.present = "TRUE"
ethernet0.connectionType = "custom"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet0.linkStatePropagation.enable = "TRUE"
ethernet0.generatedAddress = "00:0c:29:87:58:c5"
ethernet0.generatedAddressOffset = "0"
ethernet0.startConnected = "TRUE"
ethernet0.vnet = "vmnet2"
ethernet0.bsdName = "vmnet2"
ethernet0.displayName = "CustomNet"

Thank you in advance for any help you can provide.

Reply
0 Kudos
1 Solution

Accepted Solutions
WoodyZ
Immortal
Immortal
Jump to solution

Well I was able to reproduce the "Link detected: no" on eth1 and leaving the alias eth1:1 is fine and the solution is to change the following parameter:

Change ...

ethernet1.linkStatePropagation.enable = "TRUE"

To ...

ethernet1.linkStatePropagation.enable = "FALSE"

Doing this I was able to ping other 10.20.30.x IP Addresses and "ethtool eth1" shows "Link detected: yes".

View solution in original post

Reply
0 Kudos
9 Replies
WoodyZ
Immortal
Immortal
Jump to solution

I'd suggest that before proceeding that you read the entire post first so you have an overview of what I'm asking you to do...

Since I'm not sitting at your computer and in order to assist you in troubleshoot this I'm going to ask that you follow the directions contained herein as explicitly and specifically as possible and as documented in order to provide some constants that should help facilitate the troubleshooting process.

My Host is a MacBook Pro running Mac OS X Snow Leopard 10.6.4 fully updated and VMware Fusion 3.1.1 (282344) and for the test preformed I used the same IP Address (10.20.30.0) and VMnet (vmnet2) shown in your example and have used that information as I've outlined the steps below.

I've attached a .zip archive file named "Custom_Host_Only_Test_Virtual_Machines.zip" that contains two .vmx configuration files named, "Virtual Machine 1.vmx" and "Virtual Machine 2.vmx" that you will use for the test and the only configuration you'll need to do is to point the CDs & DVDs settings to the "[dsl-4.4.10.iso|http://distro.ibiblio.org/pub/linux/distributions/damnsmall/current/dsl-4.4.10.iso]" disc image file that you'll need to download from http://www.damnsmalllinux.org/ and place in the parent level folder containing the folders that contain the .vmx configuration files and both Virtual Machines can use a single copy of the "[dsl-4.4.10.iso|http://distro.ibiblio.org/pub/linux/distributions/damnsmall/current/dsl-4.4.10.iso]" disc image file. Note that this is different the then normal file based Virtual Machine Package that VMware Fusion creates and is fine for this test and was easier then creating two separate Virtual Machine Packages as all I had to do was create one folder and.vmx file and copy it renaming it and a few lines in the second folder and .vmx file. The Virtual Machines will be running the Live Linux ISO Image file and have no need for a virtual hard drive as well as other default settings have been disabled or removed for this test.

The .zip archive file also contains the bash script that I used to modify the VMware Virtual Network Infrastructure to the extent of adding/modifying/removing VMnets in the "/Library/Application Support/VMware Fusion/networking" file and want you to use it in order to maintain another constant in this process. The bash script is named "editvmnets" and can be placed in a folder that is in your {$PATH} or just drag and drop it onto a Terminal (/Applications/Utilities/Terminal) from the folder the other files are in.

Note: The contents of the bash script are just some lines of code taken from a more complex bash script that I use however it's all that's necessary to maintain a constant for this purpose and I've used this instead of my normal bash script for this testing.

Note: The bash script changes to the target folder, stops the virtual network, loads the networking file in nano to edit it, then starts the virtual network and then displays the contents of the networking file to verify the changes exist and have not been replaced by VMware Fusion which it does under certain circumstances.

The first and up coming block of code is what I added to the bottom of the networking file. Note that I normally just copy and paste these lines from a plain text file directly into nano in the Terminal after using the arrow keys to move to the insertion point which I always do at the bottom of the file. Also note that if I subsequently change any value of these parameters I remove the target VNET_(n) block again placing it at the bottom of the file. I also never include the "answer VNET_(n)_DHCP_CFG_HASH" line as this line is regenerated with different values automatically as needed.

Note: When manually editing any of the VMware Fusion application files and or manually editing any Virtual Machine files the target Virtual Machine should be shutdown from within the Guest OS, not suspended and the VMware Fusion application closed.

Now use the editvmnets bash script to add the following block of code to the networking file and if it already exists then remove the existing block and place this one at the bottom of the file. Note: When using nano to edit files use the arrow keys to move around and then Ctrl-O (O) to WriteOut the changes and then Ctrl-X (X) to Exit.

The following block of code creates a Host Only VMnet without a DHCP Server on the VMnet and without a virtual network adapter for the Host and will also require manually configuring the IP Address in each test Virtual Machine.

answer VNET_2_DHCP no
answer VNET_2_HOSTONLY_NETMASK 255.255.255.0
answer VNET_2_HOSTONLY_SUBNET 10.20.30.0
answer VNET_2_VIRTUAL_ADAPTER no

The following are the changes made for ethernet0 in the .vmx configuration files and only presented here for clarity and you do not need to edit the included .vmx configuration files as this information already exists within them.

ethernet0.connectionType = "custom"
ethernet0.vnet = "vmnet2"
ethernet0.bsdName = "vmnet2"
ethernet0.displayName = "Custom Host Only VMnet2"

Save the attached "Custom_Host_Only_Test_Virtual_Machines.zip" archive file to your Desktop and then double-click it to extract the contents and a folder named "Custom Host Only Test Virtual Machines" will be on your Desktop. (This is assuming normal Mac OS X default behavior.)

Download the "[dsl-4.4.10.iso|http://distro.ibiblio.org/pub/linux/distributions/damnsmall/current/dsl-4.4.10.iso]" disc image file and place it in the "Custom Host Only Test Virtual Machines" folder on your Desktop.

Open VMware Fusion and then either use the File > Open... command or drag and drop each .vmx configuration file onto the Virtual Machine Library's left side above Home.

For each Virtual Machine edit its CDs & DVDs settings to point to the downloaded dsl-4.4.10.iso disc image file and this is the only edit to be made for each test Virtual Machine. Do not change anything else and do not click on the list box under Network as this will break the customized network settings and it is normal for the status light on the Custom Host Onl... entry in the list box to be grayed out and is active nonetheless if the corresponding entries exist in the networking file.

The following will be done on each Virtual Machine in turn so just follow the steps on one and then the other and the only difference in the configuration to preform on each will be the last octet of the IP Address will be different then the one assigned on the other.

Start the first Virtual Machine and note that because VMware Tools are not nor will be installed you'll have to press Control+Command to ungrab the Mouse from the Virtual Machine's Display as you move back and forth between them.

At the DSL Splash Screen you can mouse-click into the Virtual Machine's Display and press Enter to accelerate the start of the boot process or it will time out and automatically start the boot process.

At the DSL Desktop close the Getting Started with DSL window.

On the Panel (bar at bottom of DSL Desktop) click the button labeled Panel to bring up the DSL Control Panel.

On the DSL Control Panel click the DHCP client button to turn it off.

On the DSL Control Panel click the Netcardconfig button.

On the DSL - Netcard Config window click into the Address IP text box and type 10.20.30.x where 'x' is a number between 1 and 253 and will be different then the last octet on Virtual Machine 2. Note: For this test I used 1 as the last octet on Virtual Machine 1 and 2 as the last octet on Virtual Machine 2.

On the DSL - Netcard Config window click into the Nameserver(s) text box to highlight and delete the default IP Address.

Note: You will notice that the Broadcast and Gateway text boxes automatically populate themselves and do not modify these values.

Click the Apply button.

Click the Exit button.

Close the DSL Control Panel

On the Panel (bar at bottom of DSL Desktop) click the button labeled Term.

In the bash Terminal type ifconfig then press Enter and verify the properties of eth0.

Leave the bash Terminal open as you'll use it to ping Virtual Machine 2 in a few minutes.

Now start Virtual Machine 2 and repeat the above steps taken in Virtual Machine 1 except to use a different number on the last octet of the IP Address. Note: For this test I used 1 as the last octet on Virtual Machine 1 and 2 as the last octet on Virtual Machine 2.

Once Virtual Machine 2 has been configured and you've completed the steps through ifconfig in the bash Terminal you can now use the following command in each Virtual Machine to ping the other.

In in the bash Terminal in Virtual Machine 2:

sudo ping -c 4 10.20.30.1

In in the bash Terminal in Virtual Machine 1:

sudo ping -c 4 10.20.30.2

The results should be as shown in the images below and if not then we'll have to start troubleshooting from here.

File Attached: Custom_Host_Only_Test_Virtual_Machines.zip

n0p
Contributor
Contributor
Jump to solution

Thank you for taking the time to help me with this. I followed your steps exactly, and both DSL virtual machines can ping each other, so VMNET 2 obviously works. My current host is a MacPro running 10.5.8 and Fusion v3.1.1 282344 (light).

I brought up my CentOS VM (eth0 is set to NAT, and eth1 is set to static IP/vmnet2) and the NAT interface works but still get the wierd no link issue on the vmnet2 interface. Even with CentOS up with no link, both DSL VMs can still talk to each other. Guessing it is something screwy with my .vmx files?

Reply
0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

Okay, it's good to see that the VMware Virtual Network Infrastructure is working as it should so obviously I believe the issue is elsewhere and more likely to be in a User Defined Setting or Guest OS Application Setting like a Firewall or AntiVirus Software.

I booted a CentOS-5.3-i386-LiveOS.iso disc image file configured to be multihomed with ethO configured for NAT and eth1 configured to use vmnet2 and had no problems communicating on either interface. I even used different values for the last octet on both the DSL and CentOS test Virtual Machines to insure other IP Addresses on the VMnet2 Subnet where reachable. I also rebooted each Virtual Machine and removed the Gateway IP Address on the DSL before applying the configuration and didn't use a Gateway IP Address on either as it really shouldn't have to be configured when using Host Only without a DHCP Server on the VMnet. So this tells me that a properly configured multihomed system can communicate on both interfaces with the Host on one interface and another Guest on the other interface as would be expected and to me this would indicate that the issue is somewhere in your CentOS Virtual Machine. But where?

I guess we can start with looking a the CentOS Virtual Machine's vmware.log files (usually 4 of them) so have a look at the "Collect vmware.log files" section in and archive/compress the vmware.log files along with the .vmx configuration file and attach the .zip archive file to a reply. Also attach a copy of the "/Library/Application Support/VMware Fusion/networking" file.

Additionally need to see the unedited output of the ifconfig command on the CentOS Virtual Machine and would like it redirected to a file and the file attached. You can use the following command syntax:

ifconfig > ~/Desktop/guest_ifconfig.txt

Note you may have to use /sbin/ifconfig however the rest of the command should create the guest_ifconfig.txt on the Desktop.

n0p
Contributor
Contributor
Jump to solution

All of the data you requested should be in the attached ZIP. Please let me know if you need anything else.

Reply
0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

Come to think of it on second thought eth1 being aliased shouldn't stop you from being able to ping so I'll have to look at the information again.

Reply
0 Kudos
n0p
Contributor
Contributor
Jump to solution

I completely removed the eth1:1 alias that had the same MAC as the primary eth1 interface, shut down the VM, restarted VMware Fusion, and brought the VM back up. It still showed no link.

Its definitely weird that the same configuration works under older v3 releases (3.0.2). VMware tools are not installed on the CentOS VM but are installed in the Windows XP (SP3) VM if that helps at all (not sure that it does, but just trying to give you all the info I've got).

Reply
0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

Well I was able to reproduce the "Link detected: no" on eth1 and leaving the alias eth1:1 is fine and the solution is to change the following parameter:

Change ...

ethernet1.linkStatePropagation.enable = "TRUE"

To ...

ethernet1.linkStatePropagation.enable = "FALSE"

Doing this I was able to ping other 10.20.30.x IP Addresses and "ethtool eth1" shows "Link detected: yes".

Reply
0 Kudos
n0p
Contributor
Contributor
Jump to solution

You sir are the man. Changing "linkStatePropagation.enable" to FALSE on both my VMs worked like a charm! Everything works again.

Reply
0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

The irony of this is with my VM's it works if is set to TRUE and in your OP is shows as TRUE although it's only shown on ethernet0 in the OP.

When i first reviewed your .vmx file both ethernet0 and ethernet1 were set to TRUE and I didn't think a thing about it because with mine set to TRUE it worked however I made an assumption that both mine were the same when in fact they weren't and I had only looked at my .vmx with one adapter defined and only after using your .vmx and it failed did I compare it to one that was multihomed and saw that when multihomed and the custom VMnet was the second adapter that it was set to FALSE on mine while yours was set to TRUE. So of course I changed it on yours and tested it even though at that point I was confident that was it and going to work nonetheless.

Anyway this thread will be good for others trying to use custom VMnets in VMware Fusion 3.1.x especially since VMware the company after 4 years still hasn't given Fusion parity with Workstation in this area of having a built-in UI to handle this.

Reply
0 Kudos