LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (http://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Why is wifi Internet not working with VMWare 6.x and Linux kernel 2.6.22? (http://www.linuxquestions.org/questions/linux-wireless-networking-41/why-is-wifi-internet-not-working-with-vmware-6-x-and-linux-kernel-2-6-22-a-587021/)

dhave 09-24-2007 01:10 PM

Why is wifi Internet not working with VMWare 6.x and Linux kernel 2.6.22?
 
Several people on the VMWare forums have reported that they can't establish a wireless Internet connection via a Windows guest using VMWare WorkStation 6.x running on a Linux kernel 2.6.22. We're able to connect wirelessly to a LAN, but not to the Internet. Wired ethernet connections under the same configuration seem to work fine.


Does anyone have insight into this? Is there a kernel change that would affect bridge networking with a virtual machine when the host machine is connected wirelessly to the Internet?


I'd really like to get to the bottom of this, as it has kept me stuck at an older kernel for several months now. Normally that wouldn't be a problem, but there are several new kernel features that I'd really like to benefit from and can't.

lx4svr 09-24-2007 01:59 PM

Correct me if I am wrong, but it sounds like you can connect to the local network with the guest using your wireless connection, but you can not reach the internet. If you have the guest use your NIC on the LAN, then both LAN and internet work. What about NAT, does it work both ways with NAT instead of bridging. I am currently running VMware workstation 6 on my laptop (SuSe), and I have never had any issues with my XP, Vista, or Sun10 guest connecting on either my eth0 or wlan1, but with more information I may have some ideas.

dhave 09-24-2007 02:04 PM

Quote:

Originally Posted by lx4svr (Post 2902284)
Correct me if I am wrong, but it sounds like you can connect to the local network with the guest using your LAN but not with the wireless connection, but you can not reach the internet. What about NAT, does it work with NAT. I am currently running VMware workstation 6 on my laptop (SuSe), and I have never had any issues with my XP, Vista, or Sun10 guest connecting on either my eth0 or wlan1, but with more information I may have some ideas.

I'm using bridged networking. Yes, I can connect to the local network but can't reach the Internet. I tried NAT but got the same results.

Everything works fine as long as I stick with Linux kernel 2.6.20 or older.

Thanks for any thoughts you might have.

dhave 09-24-2007 04:40 PM

Quote:

Originally Posted by lx4svr (Post 2902284)
I am currently running VMware workstation 6 on my laptop (SuSe), and I have never had any issues with my XP, Vista, or Sun10 guest connecting on either my eth0 or wlan1, but with more information I may have some ideas.

What kernel are you running with SuSE? Thanks.

lx4svr 09-27-2007 11:54 AM

From what I can tell, yes it sounds like it is the version of VMware is not compatible with your kernel. I am using the kernel version 2.6.18.2-34. I suggest to try using VMware workstation, or you may need to wait until a newer version of vmware-server is out. If not, then I guess that you may have to down-grade your kernel. Also you can try vmware-player, but you will not be able to create any new VM's with player.

dhave 09-27-2007 12:28 PM

Quote:

Originally Posted by lx4svr (Post 2905527)
From what I can tell, yes it sounds like it is the version of VMware is not compatible with your kernel. I am using the kernel version 2.6.18.2-34. I suggest to try using VMware workstation, or you may need to wait until a newer version of vmware-server is out. If not, then I guess that you may have to down-grade your kernel. Also you can try vmware-player, but you will not be able to create any new VM's with player.

Thank you for the information. I had suspected you were using a kernel prior to 2.6.22.

I'm already using Workstation for Linux 6.0 (and I've also tried 6.01). You are perhaps correct that there's an incompatibility with more recent Linux kernels, at least as far as wireless networking is concerned. So for now I'm using kernel 2.6.20, which works fine. I had wanted to use kernel 2.6.22, as it supports SLUB memory allocation but, since I need VMware more than I need the latest-and-greatest memory allocation algorithm, I'll wait for that.

lx4svr 09-28-2007 11:09 AM

Sounds good. I would probably ask the VMware forums, and they may be able to give you more information.

funderburg 09-29-2007 03:22 PM

I may know how to fix this. Well, I fixed it for me anyway. Note: I never use wired connections so I'm not sure what this'll do beyond wireless.

I'm currently using wireless in bridged mode with VMware Workstation 6.0.1 build-55017 on Kubuntu Gutsy with kernel 2.6.22-12-generic.

First go the directory your vmware modules source directory. Mine's at /opt/vmware/lib/vmware/modules/source. Untar the vmnet.tar file.

Then go into the newly unpacked vmnet-only directory and apply this patch:

Code:

--- bridge.c.broken    2007-08-22 03:29:43.000000000 +0100
+++ bridge.c    2007-09-29 20:11:44.000000000 +0100
@@ -32,9 +32,7 @@
 #include <linux/tcp.h>
 #include <net/tcp.h>
 
-#ifdef CONFIG_NET_RADIO
-#  include <linux/wireless.h>
-#endif
+#include <linux/wireless.h>
 #include "vmnetInt.h"
 #include "compat_spinlock.h"
 #include "compat_netdevice.h"
@@ -765,11 +763,11 @@
 VNetBridgeIsDeviceWireless(struct net_device *dev) //IN: sock
 {
 #if !defined(CONFIG_NET_RADIO)
-  return FALSE;
+  return dev->wireless_handlers != NULL;
 #elif WIRELESS_EXT > 19
    return dev->wireless_handlers != NULL;
 #elif WIRELESS_EXT > 12
-  return dev->wireless_handlers != NULL || dev->get_wireless_stats != NULL;
+  return dev->wireless_handlers != NULL;
 #else
    return dev->get_wireless_stats != NULL;
 #endif

Then retar all that back into the vmnet.tar file and rerun vmware-config.pl

You'll know if it worked when you see something this in your /var/log/messages: "bridge-eth1: is a Wireless Adapter"

daguerre 09-29-2007 10:17 PM

Works!!
Finally. This one was killing me.
Spread this fix around, a lot of folks were knocked out of action with kernel 2.6.22-4 or so.

dhave 09-30-2007 12:24 PM

Quote:

Originally Posted by daguerre (Post 2907962)
Works!!
Finally. This one was killing me.
Spread this fix around, a lot of folks were knocked out of action with kernel 2.6.22-4 or so.

Fix worked for me, too. Thanks a million, funderburg.

dhave 09-30-2007 06:13 PM

Following on funderburg's work, Hauke-m has posted on the VMware forum a pre-patched vmnet.tar for VMware (Linux) 6.0.1. You can find the link in this thread, post no. 24: http://communities.vmware.com/message/761031#761031

He has also posted a link to a patch that permits wired as well as wireless bridged networking.

funderburg 10-01-2007 05:52 AM

Quote:

Originally Posted by dhave (Post 2908682)
Following on funderburg's work, Hauke-m has posted on the VMware forum a pre-patched vmnet.tar for VMware (Linux) 6.0.1. You can find the link in this thread, post no. 24: http://communities.vmware.com/message/761031#761031

He has also posted a link to a patch that permits wired as well as wireless bridged networking.

This is much more elegant solution I think. More of a razor blade solution instead of my sledgehammer solution.

jiky1 08-15-2008 07:31 PM

Quote:

Originally Posted by funderburg (Post 2907753)
I may know how to fix this. Well, I fixed it for me anyway. Note: I never use wired connections so I'm not sure what this'll do beyond wireless.

I'm currently using wireless in bridged mode with VMware Workstation 6.0.1 build-55017 on Kubuntu Gutsy with kernel 2.6.22-12-generic.

First go the directory your vmware modules source directory. Mine's at /opt/vmware/lib/vmware/modules/source. Untar the vmnet.tar file.

Then go into the newly unpacked vmnet-only directory and apply this patch:

Code:

--- bridge.c.broken    2007-08-22 03:29:43.000000000 +0100
+++ bridge.c    2007-09-29 20:11:44.000000000 +0100
@@ -32,9 +32,7 @@
 #include <linux/tcp.h>
 #include <net/tcp.h>
 
-#ifdef CONFIG_NET_RADIO
-#  include <linux/wireless.h>
-#endif
+#include <linux/wireless.h>
 #include "vmnetInt.h"
 #include "compat_spinlock.h"
 #include "compat_netdevice.h"
@@ -765,11 +763,11 @@
 VNetBridgeIsDeviceWireless(struct net_device *dev) //IN: sock
 {
 #if !defined(CONFIG_NET_RADIO)
-  return FALSE;
+  return dev->wireless_handlers != NULL;
 #elif WIRELESS_EXT > 19
    return dev->wireless_handlers != NULL;
 #elif WIRELESS_EXT > 12
-  return dev->wireless_handlers != NULL || dev->get_wireless_stats != NULL;
+  return dev->wireless_handlers != NULL;
 #else
    return dev->get_wireless_stats != NULL;
 #endif

Then retar all that back into the vmnet.tar file and rerun vmware-config.pl

You'll know if it worked when you see something this in your /var/log/messages: "bridge-eth1: is a Wireless Adapter"

Hello,
someone can tell me how to apply this patch ? should I replace bridge.c's code by this code ? or make a new file in the vmnet-only folder, tar it, and rerun the vmware-config.pl ??

please tell me faster, this problm block me to make many test on my laptop :(

thanks

funderburg 08-16-2008 07:44 AM

Quote:

Originally Posted by jiky1 (Post 3249075)
Hello,
someone can tell me how to apply this patch ? should I replace bridge.c's code by this code ? or make a new file in the vmnet-only folder, tar it, and rerun the vmware-config.pl ??

please tell me faster, this problm block me to make many test on my laptop :(

thanks

Bearing in mind that this patch is now a year old, *wasn't the ideal solution*, the kernel has moved on a lot, and vmware has probably been updated by now, I'd rather not give you the exact command in case it doesn't work. If you feel brave run "man patch" to learn how to apply source patches.

Otherwise, yes, you're "correcting" the existing bridge.c. Just remove any matching lines with a "-" and add the lines that have a "+". Then rebuild the tar file and re-run vmware-config.pl


All times are GMT -5. The time now is 10:16 AM.