I could also call this ‘going with the flow’… So instead of fighting the system, like I usually do today we are going to do things the way everyone else enjoys doing things, and that is building stuff with tun/tap and bridges.
Ok, so I’m using Windows, and that is what I’m assuming you are as well for this ‘guide’.
The first thing you’ll need is the tun/tap driver for Windows, and the easiest way to get that is via OpenVPN. The next thing you’ll need is Qemu, again I’m just using the pre-compiled stuff right here.
Go ahead, and install them both. With OpenVPN installed, when you open your control panel, and check out your network interfaces you’ll see something like this:
One NIC, One Tap
Now for my example, I’m going to add another TAP interface. TAP’s are only good for a 1:1 relationship with the VMs. Yes, that is why I prefer something else, but again we are going to do things today the way everyone else does them.
Now for me, I run the ‘addtap’ batch file located in the C:\Program Files\TAP-Windows\bin folder as Administrator, and this now gives me two TAP adapters. I highly recommend disabling TCP/IP v4 and v6 on the TAP adapters, along with the MS client/server stuff. We are only using these for bridging the VMs so we dont’ need the host computer to participate in this network.
Now for the fun part. I’m assuming you have your NetWare server and client images all ready to go (I guess I can go over installation again some other day), and now we get to bind each one to a SINGLE TAP instance. Also don’t forget that each machine needs a UNIQUE MAC address. One of them can use the default settings, but the other one cannot.
I’m going to start my server like this:
\Progra~1\qemu\qemu-system-i386.exe -m 16 -hda netware312.disk -device ne2k_isa,netdev=usernet,mac=52:43:aa:00:00:11,irq=10,iobase=0x300 -netdev “tap,ifname=Local Area Connection 2,id=usernet”
As you can see, this gives me a NE2000 on port 0x300, IRQ 10 and sets the MAC address to 52:43:aa:00:00:11 . And this sets it on the first TAP adapter, lovingly called “Local Area Connection 2″ because the primary adapter is called “Local Area Connection“. Also take note of the quotes in this command line, as it’ll encapsulate the full default name of the TAP adapter. The other alternative is to just rename the adapters, but where is the fun in that?
Now for my client:
\Program Files\qemu\qemu-system-i386.exe” -m 16 -hda client.disk -soundhw sb16,adlib,pcspk -device ne2k_isa,irq=10,iobase=0x300,netdev=usernet -netdev “tap,ifname=Local Area Connection 3,id=usernet”
As you can see the primary difference here is that it’s connected to “Local Area Connection 3” which is my second TAP interface.
Now with both virtual machines running the interfaces will turn on!
But as you’ll quickly discover, neither machine can talk to each-other, as they are islands so to speak.
Two virtual machines on islands.
Now for the fun part, we highlight the two TAP interfaces, right click, and turn on the built in bridge function of Windows!
highlight and select
And once that is done, a new Network Bridge interface will show up, transfer what layer 3 settings there are, and then setup the layer 2 bridge between the TAP interfaces.
And once the bridge interface has gone live, give spanning tree 15 seconds to do it’s thing, and YES you can now login to the NetWare server!
Logging in from the MS-DOS VM to the NetWare 3.12 VM
And there you go! This is the ‘approved’ way to do virtual networking with Qemu.
Now I know what you are thinking, this is great for VM’s and all that jazz, but what if I say have an office FULL of old PC’s and I want them onto my new fangled ancient server?
No problem, right click on the bridge, and select delete. This will put everything back the way it was, sending the VMs back to their own TAP interfaces. Now select all the interfaces, and then setup a bridge (I suppose you could edit the existing one to include the physical interface…) and now once the bridge has been setup, it’ll now be talking out the local Ethernet interface.
One quick note, bridging and WiFi tend to not go hand in hand. Some interfaces will work, but the rule seems to be the vast majority of setups will not. So don’t complain if yours didn’t work, you are just part of the 99.99999%. And if you did get yours to work, well good for you.