Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jul 2004 01:34:53 +0200 (CEST)
From:      Per Hedeland <per@hedeland.org>
To:        per@hedeland.org, Sean_Welch@alum.wofford.org
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: Patches to allow running multiple vmware3 instances
Message-ID:  <200407012334.i61NYrRx009047@pluto.hedeland.org>
In-Reply-To: <200407011323.i61DNhZ6000679@pluto.hedeland.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I wrote:
>
>Sean Welch wrote:
>>
>>I added in your patches and recompiled.  I do indeed get multiple
>>vmnet interfaces but I don't seem able to configure them as you show
>>in your example.  Specifically, I cannot configure the interfaces to
>>be on the same subnet with the same netmask.
>
>That's right - FreeBSD doesn't allow this AFAIK (it doesn't "make sense"
>from a routing perspective). So that's a limitation that follows from
>the use of one vmnet interface per vmware instance: Each vmware instance
>must be in its own subnet. Unless you use bridged mode, of course...

But it occurred to me that this limitation can be removed with a
moderate amount of trickery - and best of all, trickery limited to the
config file, the (patched) start script is all set to deal with it.

The trick is to use a sort of "hybrid" mode (the "Unless..." is actually
half the answer): If you want multiple instances to be in the same
subnet, you just bridge the corresponding *vmnet* devices together, but
*not* together with any "real" interface. I.e. in the config file Sean's
case would look like:

vmnet1.Bridged = "NO"
vmnet1.BridgeInterface = ""
vmnet1.HostOnlyAddress = "172.19.20.40"
vmnet1.HostOnlyNetMask = "255.255.255.0"
vmnet2.Bridged = "YES"
vmnet2.BridgeInterface = "vmnet1"
vmnet2.HostOnlyAddress = "192.168.0.1"
vmnet2.HostOnlyNetMask = "255.255.255.0"

(Using the "default bridge-interface IP address" for vmnet2...) And it's
possible to add more vmnets like this of course, as long as they're all
specified as bridged to vmnet1 (or whichever you chose to be the
"non-bridged" one - it has to be before the others numerically
though). Actually you can have multiple such "non-bridged bridges"
too... With this setup, you can have the vmwares be e.g. 172.19.20.42
and 172.19.20.43, and everyone using 255.255.255.0 as netmask.

--Per Hedeland
per@hedeland.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407012334.i61NYrRx009047>