Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Jul 2004 23:25:28 -0500
From:      Sean Welch <Sean_Welch@alum.wofford.org>
To:        Per Hedeland <per@hedeland.org>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: Patches to allow running multiple vmware3 instances
Message-ID:  <20040702042528.GA1911@NitroPhys.welchsmnet.net>
In-Reply-To: <200407012334.i61NYrRx009047@pluto.hedeland.org>
References:  <200407011323.i61DNhZ6000679@pluto.hedeland.org> <200407012334.i61NYrRx009047@pluto.hedeland.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for the good suggestion -- it works excellently well!

My current config file looks like this:

vmware.fullpath = "/usr/local/lib/vmware/bin/vmware"
wizard.fullpath = "/usr/local/lib/vmware/bin/vmware-wizard"
dhcpd.fullpath = "/usr/local/lib/vmware/bin/vmnet-dhcpd"
loop.fullpath = "/usr/local/lib/vmware/bin/vmware-loop"
libdir = "/usr/local/lib/vmware"
vmnet1.Bridged = "NO"
vmnet1.BridgeInterface = ""
vmnet1.HostOnlyAddress = "172.19.20.1"
vmnet1.HostOnlyNetMask = "255.255.255.0"
vmnet2.Bridged = "YES"
vmnet2.BridgeInterface = "vmnet1"
vmnet2.HostOnlyAddress = "192.168.0.1"
vmnet2.HostOnlyNetMask = "255.255.255.0"

My first client is 172.19.20.34 and the second is 172.19.20.35 --
both able to get to the net, the host machine, and each other.

Sean

On Fri, Jul 02, 2004 at 01:34:53AM +0200, Per Hedeland wrote:
> 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?20040702042528.GA1911>