VMware Communities
Bob_Zimmerman
Expert
Expert

vmware-config-net.pl and adding more vmnets

I've been browsing through vmware-config-net.pl and I think I've got this figured out, but I want to do a sanity check with other people before making my modifications. Specifically, I've found that seven vmnets (ten total minus three special-purpose) simply isn't enough for what I do. Teams are ideal for me because they let me set up named network segments, but having more vmnets could work well enough.

I work for a rather well-known firewall company and I need to be able to simulate some decently complex networks. We're talking four or more gateways, each of which has at least three interfaces. Most of the time, I don't want these networks linked to the host or the outside world. I don't want any extraneous traffic in any captures I may have to do (nor do I want the chance of leaking data onto the public network). Thus, the three reserved vmnets are out.

Inside the vmware-config-net.pl script, I noticed several lines that look relevant.

# By convention, vmnet1 is the virtual ethernet interface connected to the

\# private virtual network that Samba uses. We are also reserving vmnet0

\# for bridged networks. These are reserved vmnets.

my $gDefBridged = '0';

my $gDefHostOnly = '1';

my $gDefNat = '8';

\# Reserved vmnets

my @gReservedVmnet = ($gDefBridged, $gDefHostOnly, $gDefNat);

\# Constant defined as the smallest vmnet that is allowed

my $gMinVmnet = '0';

\# Linux doesn't allow more than 7 characters in the names of network

\# interfaces. We prefix host only interfaces with 'vmnet' leaving us only 2

\# characters.

\# Constant defined as the largest vmnet that is allowed

my $gMaxVmnet = '99';

\# Constant defines as the number of vmnets to be pre-created

my $gNumVmnet = 10;[/code]

Now, from the look of it, I could change gNumVmnet to 100 and get up to 97 usable vmnets. Is that correct?

Does anyone know what the performance impact would be if I were to change gNumVmnet to, say, 20?

Since there's no interface to specify which vmnet to use yet, I would have to manually edit the vmx file. I can live with that, but I would also like to verify that

ethernet1.present = "TRUE"

ethernet1.connectionType = "custom"

ethernet1.vnet = "VMnet3"[/code]

is still the correct syntax. I've tried it in some VMs and it works. Is that the correct way to do it, or is there a better method now?

0 Kudos
11 Replies
rcardona2k
Immortal
Immortal

Did you happen to catch this information in the Fusion Release Notes?

[b]Improved networking[/b] — Automatically bridge to the computer’s primary network interface.

Full support for Airport wireless networking, including virtual machines behind a NAT firewall and bridged to the local Airport network.

Support for up to ten virtual network interfaces[/i]

For anything above 10 vmnets, the VMware product I recommend is VMware ESX Server 3.0. Or I recommend you obtain an intelligent Layer 3 switch where you can program port-specific 802.1q VLANs that you bridge to from VMs.

Another limitation to be aware of is four virtual NICs per VM.

0 Kudos
RDPetruska
Leadership
Leadership

Bob,

If you run Workstation or Server on a Linux host, you can have up to 100 VMnets. On a Windows host (and apparently Mac too), you can have up to 10. So, you might want to ditch that Mac and just get a nice, cheap clonePC, put Linux on it, and use one of the Linux-hosted VMware products if you need that many VMnets. It'll still be lots cheaper than ESX. Smiley Happy

0 Kudos
rcardona2k
Immortal
Immortal

>If you run Workstation or Server on a Linux host, you can have up to 100 VMnets.

I wonder why the disparity between Windows/OS X and Linux?

>So, you might want to ditch that Mac and just get a nice, cheap clonePC, put Linux on it

C'mon you don't need to ditch the hardware to install Linux. Keep the Ferrari, just put a coat of Linux on it. Smiley Happy

0 Kudos
RDPetruska
Leadership
Leadership

>I wonder why the disparity between Windows/OS X and Linux?

I've read it has something to do with the length of the device names. I'm surprised at the OSX issue - I thought BSD and Linux were fairly close in design.

0 Kudos
KevinG
Immortal
Immortal

  1. Constant defines as the number of vmnets to be pre-created

my $gNumVmnet = 10;

The key word here is "pre-created" , the default script will create /dev/vmnet0 to /dev/vnet9. You can still run the vmware-config.pl script and create more vmnet's by selecting the "Editor" option when making network changes

0 Kudos
Bob_Zimmerman
Expert
Expert

When it says "Support for up to ten virtual network interfaces" in the Fusion release notes, it means support for up to ten NICs in a single VM. I confirmed this by actually hitting the little + button in the hardware screen again and again and it let me create ten network cards. My guest OS recognized them all, too.

That also makes me wonder why there are only ten vmnets, since that means you could only make use of all ten virtual NICs if you wanted total connectivity between VMs.

Does VMware actually support VLAN trunking over vmnets? I haven't tried that yet. Really, my problem could be solved by setting everything to use a single vmnet with VLANs, but I would ideally like to use separate vmnets for things. Some of the operating systems I need to use as gateways are somewhat ... iffy when it comes to working with VLANs.

There's no way I'll be able to justify buying ESX Server any time soon. 😜 This is especially true since Workstation supports named networks in Teams. I haven't yet run into a limitation of those.

0 Kudos
Bob_Zimmerman
Expert
Expert

How do I get to that? Whenever I run vmware-config-net.pl from the command line, it just probes for a new network for my NAT. From what I can tell, the script has only one execution path. I didn't spot any requests for user input or checks for command line arguments. I don't know Perl that well, so I may have missed something.

Also, I am not finding any /dev/vmnet* devices. My VMs are still able to do network things, though.

0 Kudos
HogHerder
Contributor
Contributor

I would have thought this would have been addressed with the release of Fusion 1.0. vmware-config-net.pl still appears to be broken.

Does anyone have tips/suggestions on setting up a small number of vmnets (eg, vmnet2 through vmnet4) in Fusion? Even a procedure for Linux/etc. with some adaptation would be helpful.

TIA

0 Kudos
RDPetruska
Leadership
Leadership

Have you read the announcement http://www.vmware.com/community/ann.jspa?annID=393 ? DaveP has posted a whitepaper on setting up the virtual networks...

0 Kudos
HogHerder
Contributor
Contributor

Ahh ... thank you!

What I need is exactly what is coming (hoped-for?) in Part 2.

DaveP -- great work, please send anything you can on configuring additional virtual adapters to Fusion ASAP!

0 Kudos
DaveP
Commander
Commander

Check out the orginal thread. First new hack for additional bridged adapter. More coming!

0 Kudos