I use VMware server on my computers at home. Both of my current systems run Fedora 8, kernel 2.6.25.6-27. I say this because on my laptop I couldn’t configure a VM to use bridged network mode when wlan0 was the only active interface.
After a lot of googling, I came across this post. The post is almost entirely in german, however there is an abbreviated version somewhere in the middle in english.
Normally, I wouldn’t go any further than posting a link, however while I was reviewing some links on my del.icio.us account, I clicked the above, and discovered that the site has a tremendous number of errors. This is bad. It usually means that the site is not well maintained and not long for the internet.
Additionally, the patch that’s posted is slightly out of date. So, I’ve created an updated patch, and I’m going to post some instructions in english here.
The gist of the problem is that wireless is slow and apparently VMware doesn’t trust it enough to provide bridged networking for VMs. Who can blame them…I’m sure they don’t really consider people using their server software on a laptop, and even if they do, there are probably only a very few who use wireless networking as the primary interface.
To fix the problem, after installing the VMware Server package, but before executing the configuration script (vmware-config.pl), we want to alter the package so that it will enable wireless to act as a bridge interface.
Now, before we go any further I want to make it clear that I am not a lawyer. Because of this, I have no idea how VMware does/could/might feel about modifying their code. They may not care. They might come and hunt me down, break my knee caps, and kick my dog after I post this. I don’t know. Consequentially, if you are a VMware employee, associated with VMware, know someone from VMware, dated the CEO’s daughter, stalked the guy who wrote the PowerShell toolkit, whatever, and you feel that VMware (or you, if you work for VMware) might be offended by this modification, let me know, and it’ll be removed. No complaints, no hesitation on my part. I only hope VMware is better natured than Creative when people modify things to work for them.
Ok, with that off my chest, onward to C…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# create our working directory mkdir /tmp/vmnet # unpack the source tar xf /usr/lib/vmware/modules/source/vmnet.tar -C /tmp/vmnet # apply the patch cd /tmp/vmnet patch -p0 < /path/to/wireless_bridge.patch # now we recreate the tar tar cf vmnet.tar vmnet-only/ # make a backup of the original, and move our new in place cp /usr/lib/vmware/modules/source/vmnet.tar /usr/lib/vmware/modules/source/vmnet.tar.bak mv ./vmnet.tar /usr/lib/vmware/modules/source/ |
After all that, run the configure script (vmware-config.pl). It will compile the needed items for VMware Server using the new bridge.c file and you *should* be good.
Here is what is modified by the patch:
1 2 3 4 5 6 7 8 9 10 11 |
Line 35: Original: #ifdef CONFIG_NET_RADIO New: #if defined CONFIG_NET_RADIO || defined CONFIG_WLAN_80211 Line 855: Original: #if !defined(CONFIG_NET_RADIO) New: #if !defined CONFIG_NET_RADIO && !defined CONFIG_WLAN_80211 |
If it doesn’t work for you, well, I’m sorry. I know enough C to break whatever I’m modifying on most days, so I’m of almost no help.
Hopefully I won’t get a visit from any henchmen…
Patch (I can’t figure out how to post a file…):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
diff -Naur vmnet.orig/vmnet-only/bridge.c vmnet.new/vmnet-only/bridge.c --- vmnet-only/bridge.c 2008-05-10 00:25:56.000000000 -0400 +++ vmnet-only/bridge.c 2008-06-22 02:20:59.000000000 -0400 @@ -32,7 +32,7 @@ #include #include -#ifdef CONFIG_NET_RADIO +#if defined CONFIG_NET_RADIO || defined CONFIG_WLAN_80211 # include #endif #include "vmnetInt.h" @@ -852,7 +852,7 @@ static Bool VNetBridgeIsDeviceWireless(struct net_device *dev) //IN: sock { -#if !defined(CONFIG_NET_RADIO) +#if !defined CONFIG_NET_RADIO && !defined CONFIG_WLAN_80211 return FALSE; #elif WIRELESS_EXT > 19 return dev->wireless_handlers != NULL; |