Tuesday, March 1, 2011

Unable to build the vmnet module

When I run vmware-config.pl , I encounter the following message. Result in 8333 and 8222 not responding. Of course no Web UI .


make: Entering directory `/tmp /vmware-config3 /vmnet-only '
make -C /lib/modules/2.6.24 -zen4 -praka1 /build/include/.. SUBDIRS =$PWD SRCROOT =$PWD /. modules
make[1]: Entering directory `/usr/src/zen-sources'
CC [M] /tmp/vmware-config3/vmnet-only/driver.o
CC [M] /tmp/vmware-config3/vmnet-only/hub.o
CC [M] /tmp/vmware-config3/vmnet-only/userif.o
CC [M] /tmp/vmware-config3/vmnet-only/netif.o
CC [M] /tmp/vmware-config3/vmnet-only/bridge.o
/tmp/vmware-config3/vmnet-only/bridge.c:35:8: error: "defined" cannot be used as a macro name
make[2]: *** [/tmp/vmware-config3/vmnet-only/bridge.o] Error 1
make[1]: *** [_module_/tmp/vmware-config3/vmnet-only] Error 2
make[1]: Leaving directory `/usr/src/zen-sources'
make: *** [vmnet.ko] Error 2
make: Leaving directory `/tmp/vmware-config3/vmnet-only'
Unable to build the vmnet module.


Solution

1 .Download this file : http ://www.centos.org /modules/newbb /viewtopic.php ?topic_id =23040& amp;amp;amp;amp;amp;forum=37

2. Unzip vmnet.tar.gz --> it will become vmnet.tar

3. under /usr/lib/vmware/modules/source/ Replace old vmnet.tar with this one.
(In my case, the compat_netdevice.h is not updated. I have to untar vmnet.tar --> comment out this function in compat_netdevice.h, then tar the vmnet-only folder back to vmnet.tar again. Then save the file in /usr /lib/vmware /modules/source/.


/* needs to be commented out to get vmxnet to compile under CentOSPlus kernel
struct napi_struct {
int dummy;
};
*/


4. run vmware-config.pl again. (if it does not work, you may want to uninstall and reinstall.)

P.S. Another difference in my successful installation as opposed to failed one is the Serial Number. I entered it last time.


Reference

http ://bugs.centos.org /view.php ?id=3977

http ://ubuntuforums.org /showthread.php ?t=735524

No comments: