Search code examples
centosvmware-workstation

installation of vmware workstation 10.0.1 on Centos 7


I am attempting to install VMware workstation 10.0.1 on a new installation of CEntOS version 7 (kernel version 3.10.0).

I have copied the vmnet.tar file from /lib/vmware/modules/source to my home directory for debugging. The building of the vmnet module fails with the following error message:

/bin/make -j12 auto-build HEADER_DIR=/lib/modules/3.10.0-123.el7.x86_64/build/include CC=/bin/gcc IS_GCC_3=no
Using 2.6.x kernel build system.
/bin/make -C /lib/modules/3.10.0-123.el7.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/kernels/3.10.0-123.el7.x86_64'
  CC [M]  /home/******/junk/vmnet-only/filter.o
/home/******/junk/vmnet-only/filter.c:206:1: error: conflicting types for ‘VNetFilterHookFn’
VNetFilterHookFn (unsigned int hooknum,                 // IN:
^
/home/******/junk/vmnet-only/filter.c:64:18: note: previous declaration of ‘VNetFilterHookFn’ was here
static nf_hookfn VNetFilterHookFn;
                 ^
/home/******/junk/vmnet-only/filter.c:64:18: warning: ‘VNetFilterHookFn’ used but never defined [enabled by default]
/home/******/junk/vmnet-only/filter.c:206:1: warning: ‘VNetFilterHookFn’ defined but not used [-Wunused-function]
VNetFilterHookFn (unsigned int hooknum,                 // IN:
^ 
make[2]: *** [/home/******/junk/vmnet-only/filter.o] Error 1
make[1]: *** [_module_/home/******/junk/vmnet-only] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.10.0-123.el7.x86_64'
make: *** [vmnet.ko] Error 2

I've googled a bit, but I didn't find anything specific to WS 10.0.1, although I did find some patches for the installation of WS 10.0.3 but it appears that these patches would be ineffective for WS 10.0.1. I believe this because the macro that they are modifying in the patch (KERNEL_VERSION) is no in the offending file, filter.c.

Anyone have a link to a solution to this problem.

Thanks!


Solution

  • I had a similar problem. Found this solution and worked:

    cd /usr/lib/vmware/modules/source
    tar -xvf vmnet.tar
    cd vmnet-only
    vi filter.c
    

    Go to lines 206 and 259 and replace the string

    #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
    

    By

    #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)
    

    Then:

    cd ..
    tar -uvf vmnet.tar vmnet-only
    rm -rf vmnet-only
    

    Then run vmware workstation again and it should be able to install the kernel modules. Good luck!