Aug 102011
 

UPDATE3: I’ve changed the patch to support the weird versioning in the fedora kernels.

UPDATE2: I’ve added in the list of supported versions 7.1.5 and 3.1.5 for vmware player, so the script will run with no modifications but remember that when vmware releases a new minor most probably changing the version at the top of the script (or applying the patch manually) will work fine.

UPDATE: I’ve added now a full patch starting from clean vmware 7.1.4 sources (together with the patch script for easier use)

This time fixing the kernel modules for vmware was quite simple. It seems some define used to “advertise” the presence of some features in the kernel where removed (in netdevice.h), breaking so the “compatibility” layer of the kernel modules sources of vmware.

So the fix is quite easy. It ends up in just adding those missing defines in the compat_netdevice.h if the kernel version is greater or equal to 3.1.

I’ve attached a patch which is to be applied after the previous one. Later I will probably do a full patch like with the previous one.

Attached Files:

  58 Responses to “Vmware workstation 7.1.4 fix for linux 3.1”

  1. Confirmed, the ‘additional’ 3.1 patch works OK with 3.1-rc3 (kernel.org)…

    Thanks again..

    Robert Gadsdon.

  2. I attemped to apply the patch and it failed. Any ideas?

    root@thinkpad:/usr/lib/vmware/modules/source# ls
    source vmblock.tar vmci.tar vmmon.tar vmnet-onlya vmnet.tar vsock.tar
    root@thinkpad:/usr/lib/vmware/modules/source# patch -p0 < /home/asv/Downloads/patch3031vmware741.patch
    patching file vmnet-onlya/vmnet-only/compat_netdevice.h
    Hunk #1 FAILED at 47.
    1 out of 1 hunk FAILED — saving rejects to file vmnet-onlya/vmnet-only/compat_netdevice.h.rej

    • check that it’s the last version of the sources where you are applying the patch at and no other patches where applied to it. also the patch must be applied after the previous one I made

  3. With a completely-fresh install (VMware-Workstation-Full-7.1.4-385536.x86_64.bundle)
    I get the following error using the full-patch shown above.

    /usr/src/vmware# ./patch-modules_2.6.39.sh
    patching file vmblock-only/linux/dentry.c
    patching file vmblock-only/linux/filesystem.c
    patching file vmci-only/linux/driver.c
    Hunk #1 succeeded at 34 with fuzz 2 (offset -8 lines).
    patching file vmmon-only/linux/driver.c
    patching file vmmon-only/linux/hostif.c
    patching file vmmon-only/linux/iommu.c
    patching file vmnet-only/compat_netdevice.h
    patching file vmnet-only/driver.c
    Hunk #2 succeeded at 104 with fuzz 1.
    Hunk #3 FAILED at 114.
    1 out of 5 hunks FAILED — saving rejects to file vmnet-only/driver.c.rej
    patching file vmnet-only/filter.c
    Hunk #1 succeeded at 84 (offset -1 lines).
    patching file vmnet-only/hub.c
    patching file vsock-only/linux/af_vsock.c
    patching file vsock-only/linux/util.c

    ———–

    running vmware to build results in this:

    Using 2.6.x kernel build system.
    make: Entering directory `/tmp/vmware-root/modules/vmmon-only’
    make -C /lib/modules/3.1.0-rc6+/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory `/usr/src/linux’
    CC [M] /tmp/vmware-root/modules/vmmon-only/linux/driver.o
    /tmp/vmware-root/modules/vmmon-only/linux/driver.c:783: error: ‘SPIN_LOCK_UNLOCKED’ undeclared here (not in a function)
    make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/driver.o] Error 1
    make[1]: *** [_module_/tmp/vmware-root/modules/vmmon-only] Error 2
    make[1]: Leaving directory `/usr/src/linux’
    make: *** [vmmon.ko] Error 2
    make: Leaving directory `/tmp/vmware-root/modules/vmmon-only’

    Something doesn’t look quite right here to me…

  4. Ah… weird. For some reason, the patch never applied to the files.

    Manually applying them to each tar-file bundle allows it to build correctly.

    I can ignore the error for now.

  5. This should probably have a new thread…

    I just upgraded to VMware Workstation 8.0, and it doesn’t compile cleanly with Linux kernel 3.1-rcx! But. the fix is the same as for 7.1.4, except that his time, only the 3.0-to-3.1 patch is needed – for compat_netdevice.h in vmnet. On my system, the (Linux) host needed to be rebooted after compat_netdevice.h was patched, or VMware wouldn’t start, even though all the modules compiled cleanly..
    So – now I have VMware Workstation 8.0 running under Linux 3.1-rc6..

    Thanks again..

    Robert Gadsdon.

  6. [...] least for the Workstation. They are: http://weltall.heliohost.org/wordpre…atchv3.tar.bz2 -and- vmware workstation 7.1.4 fixes to use linux 3.1 | Weltall's blog You can find more details on my WebPage at: http://dusty-tr2.trcomputing/~ctaylo…tml#VMware_ref [...]

  7. Thanks it worked perfect for my openSuSe 12.1!

  8. Need a patch for 7.1.5 too!

  9. Thanks! Used this patch to compile for Workstation 7.1.5 on Ubuntu 11.10.

  10. Hi!

    Works great!
    Vmware Workstation 7.1.4 build-385536
    openSUSE 12.1 Beta 1 (x86_64)
    kernel 3.1.0-rc7-3-default (x86_64)

    Cheers,
    Markus

  11. Worked great for me on Ubuntu 11.10 with VMware Workstation 7.1.4 build-385536. Thanks!

  12. Work perfektly! Thanks a lot!

    VMware Workstation 7.1.5
    Ubuntu 11.10, Kernel 3.0.0-12

    Regards
    Thorsten

  13. [...] Workarround bzw. einen Patch habe ich in Stefano´s Weltall Blog gefunden. Er hat einen Patch geschrieben welcher das Problem lößt. Dieser ist in seinem Beitrag [...]

  14. Thx, fixed vmplayer on 3.1 for me!

  15. Compiled VMware-Workstation-Full-7.1.5-491717.i386.bundle on 2.6.40.6-0.fc15.i686 using this patch.
    Thank you!

  16. Hello
    until now your patch worked wonderful. But today openSUSE brought the kernel in version 3.1.0-46. With VMmware-workstation 7.1.5.491717 I am now not able to compile the required kernel modules to get VMware up and running. All modules but the network module work. Following are the messages during compiling. Do you have an idea how to solve this?

    Andi


    In file included from /tmp/vmware-root/modules/vmnet-only/netif.c:43:0:
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:186:0: warning: "alloc_netdev" redefined
    /usr/src/linux-3.1.0-46/include/linux/netdevice.h:2438:0: note: this is the location of the previous definition
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:187:0: warning: "alloc_etherdev" redefined
    /usr/src/linux-3.1.0-46/include/linux/etherdevice.h:53:0: note: this is the location of the previous definition
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:208:1: error: conflicting types for ‘netif_start_queue’
    /usr/src/linux-3.1.0-46/include/linux/netdevice.h:1804:20: note: previous definition of ‘netif_start_queue’ was here
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h: In function ‘netif_start_queue’:
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:210:21: error: ‘struct device’ has no member named ‘tbusy’
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h: At top level:
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:214:1: error: conflicting types for ‘netif_stop_queue’
    /usr/src/linux-3.1.0-46/include/linux/netdevice.h:1869:20: note: previous definition of ‘netif_stop_queue’ was here
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h: In function ‘netif_stop_queue’:
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:216:19: error: ‘struct device’ has no member named ‘tbusy’
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h: At top level:
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:220:1: error: conflicting types for ‘netif_queue_stopped’
    /usr/src/linux-3.1.0-46/include/linux/netdevice.h:1895:19: note: previous definition of ‘netif_queue_stopped’ was here
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h: In function ‘netif_queue_stopped’:
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:222:11: error: ‘struct device’ has no member named ‘tbusy’
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:222:11: error: ‘struct device’ has no member named ‘tbusy’
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h: At top level:
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:226:1: error: conflicting types for ‘netif_wake_queue’
    /usr/src/linux-3.1.0-46/include/linux/netdevice.h:1838:20: note: previous definition of ‘netif_wake_queue’ was here
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h: In function ‘netif_wake_queue’:
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:228:21: error: ‘struct device’ has no member named ‘tbusy’
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:229:4: error: implicit declaration of function ‘mark_bh’
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:229:12: error: ‘NET_BH’ undeclared (first use in this function)
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:229:12: note: each undeclared identifier is reported only once for each function it appears in
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h: At top level:
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:233:1: error: conflicting types for ‘netif_running’
    /usr/src/linux-3.1.0-46/include/linux/netdevice.h:1911:19: note: previous definition of ‘netif_running’ was here
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h: In function ‘netif_running’:
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:235:14: error: ‘struct device’ has no member named ‘start’
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h: At top level:
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:239:1: error: conflicting types for ‘netif_carrier_ok’
    /usr/src/linux-3.1.0-46/include/linux/netdevice.h:2145:19: note: previous definition of ‘netif_carrier_ok’ was here
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:245:1: error: conflicting types for ‘netif_carrier_on’
    /usr/src/linux-3.1.0-46/include/linux/netdevice.h:2154:13: note: previous declaration of ‘netif_carrier_on’ was here
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:250:1: error: conflicting types for ‘netif_carrier_off’
    /usr/src/linux-3.1.0-46/include/linux/netdevice.h:2156:13: note: previous declaration of ‘netif_carrier_off’ was here
    /tmp/vmware-root/modules/vmnet-only/netif.c: In function ‘VNetNetIfSetup’:
    /tmp/vmware-root/modules/vmnet-only/netif.c:149:7: error: ‘struct net_device’ has no member named ‘init’
    /tmp/vmware-root/modules/vmnet-only/netif.c:150:7: error: ‘struct net_device’ has no member named ‘open’
    /tmp/vmware-root/modules/vmnet-only/netif.c:151:7: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
    /tmp/vmware-root/modules/vmnet-only/netif.c:152:7: error: ‘struct net_device’ has no member named ‘stop’
    /tmp/vmware-root/modules/vmnet-only/netif.c:153:7: error: ‘struct net_device’ has no member named ‘get_stats’
    /tmp/vmware-root/modules/vmnet-only/netif.c:154:7: error: ‘struct net_device’ has no member named ‘set_mac_address’
    /tmp/vmware-root/modules/vmnet-only/netif.c:155:7: error: ‘struct net_device’ has no member named ‘set_multicast_list’
    /tmp/vmware-root/modules/vmnet-only/netif.c: In function ‘VNetNetIfNetDeviceToNetIf’:
    /tmp/vmware-root/modules/vmnet-only/netif.c:196:14: error: ‘struct net_device’ has no member named ‘priv’
    /tmp/vmware-root/modules/vmnet-only/netif.c: In function ‘VNetNetIf_Create’:
    /tmp/vmware-root/modules/vmnet-only/netif.c:309:4: error: implicit declaration of function ‘compat_alloc_netdev’
    /tmp/vmware-root/modules/vmnet-only/netif.c:309:8: warning: assignment makes pointer from integer without a cast
    /tmp/vmware-root/modules/vmnet-only/netif.c:314:7: error: ‘struct net_device’ has no member named ‘priv’
    /tmp/vmware-root/modules/vmnet-only/netif.c: In function ‘VNetNetIfReceive’:
    /tmp/vmware-root/modules/vmnet-only/netif.c:395:4: warning: passing argument 1 of ‘netif_running’ from incompatible pointer type
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:233:1: note: expected ‘struct device *’ but argument is of type ‘struct net_device *’
    /tmp/vmware-root/modules/vmnet-only/netif.c: In function ‘VNetNetifOpen’:
    /tmp/vmware-root/modules/vmnet-only/netif.c:473:4: warning: passing argument 1 of ‘netif_start_queue’ from incompatible pointer type
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:208:1: note: expected ‘struct device *’ but argument is of type ‘struct net_device *’
    /tmp/vmware-root/modules/vmnet-only/netif.c: In function ‘VNetNetifClose’:
    /tmp/vmware-root/modules/vmnet-only/netif.c:521:4: warning: passing argument 1 of ‘netif_stop_queue’ from incompatible pointer type
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:214:1: note: expected ‘struct device *’ but argument is of type ‘struct net_device *’
    /tmp/vmware-root/modules/vmnet-only/netif.c: In function ‘netif_running’:
    /tmp/vmware-root/modules/vmnet-only/compat_netdevice.h:236:1: warning: control reaches end of non-void function
    make[4]: *** [/tmp/vmware-root/modules/vmnet-only/netif.o] Fehler 1
    make[3]: *** [_module_/tmp/vmware-root/modules/vmnet-only] Fehler 2
    make[2]: *** [sub-make] Fehler 2
    make[1]: *** [all] Fehler 2
    make[1]: Leaving directory `/usr/src/linux-3.1.0-46-obj/i386/desktop'
    make: *** [vmnet.ko] Fehler 2
    make: Leaving directory `/tmp/vmware-root/modules/vmnet-only'

    • can’t say what is it without seeing it. are you sure there isn’t a problem with opensuse? because the vanilla 3.1 works well. check also the patch are still in place

  17. work fine on fedora 16beta (kernel 3.1.0-7.fc16.i686.PAE)
    with Vmware ( 7.1.5 build-491717)

    thank you very much

  18. Thanks a lot for your patches, and the easy installation script too! :)
    I’m really happy you’ve put work into this.

    Since I’m using a 32bit only system (white MacBook), so I can’t upgrade to VMWare Player 4.x, and find myself stuck with 3.1.4 / 3.1.5. Thanks to your patches, my system’s lifetime has just been prolonged :)

  19. tkx so much !!!!!!!!

  20. Does not work for me, could you please have a look?

    [root@gridnev-laptop:/usr/lib/vmware/modules]# ./patch-modules_2.6.39.sh
    patching file vmblock-only/linux/dentry.c
    patching file vmblock-only/linux/filesystem.c
    patching file vmci-only/linux/driver.c
    patching file vmmon-only/linux/driver.c
    Hunk #1 succeeded at 785 (offset 5 lines).
    Hunk #2 succeeded at 1046 (offset 5 lines).
    patching file vmmon-only/linux/hostif.c
    patching file vmmon-only/linux/iommu.c
    patching file vmnet-only/compat_netdevice.h
    patching file vmnet-only/driver.c
    patching file vmnet-only/filter.c
    patching file vmnet-only/hub.c
    patching file vsock-only/linux/af_vsock.c
    patching file vsock-only/linux/util.c
    Stopping VMware services:
    VMware USB Arbitrator done
    VM communication interface socket family done
    Virtual machine communication interface done
    Virtual machine monitor done
    Blocking file system done
    Using 2.6.x kernel build system.
    make: Entering directory `/tmp/vmware-root/modules/vmmon-only'
    make -C /lib/modules/3.1.0-1-amd64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory `/usr/src/linux-headers-3.1.0-1-amd64'
    CC [M] /tmp/vmware-root/modules/vmmon-only/linux/driver.o
    CC [M] /tmp/vmware-root/modules/vmmon-only/linux/driverLog.o
    CC [M] /tmp/vmware-root/modules/vmmon-only/linux/hostif.o
    /tmp/vmware-root/modules/vmmon-only/linux/hostif.c: In function ‘HostIFReadUptimeWork’:
    /tmp/vmware-root/modules/vmmon-only/linux/hostif.c:2048:10: warning: ‘newUpBase’ may be used uninitialized in this function [-Wuninitialized]
    CC [M] /tmp/vmware-root/modules/vmmon-only/linux/iommu.o
    CC [M] /tmp/vmware-root/modules/vmmon-only/common/comport.o
    CC [M] /tmp/vmware-root/modules/vmmon-only/common/cpuid.o
    CC [M] /tmp/vmware-root/modules/vmmon-only/common/hashFunc.o
    CC [M] /tmp/vmware-root/modules/vmmon-only/common/memtrack.o
    CC [M] /tmp/vmware-root/modules/vmmon-only/common/phystrack.o
    CC [M] /tmp/vmware-root/modules/vmmon-only/common/task.o
    CC [M] /tmp/vmware-root/modules/vmmon-only/common/vmx86.o
    CC [M] /tmp/vmware-root/modules/vmmon-only/vmcore/moduleloop.o
    LD [M] /tmp/vmware-root/modules/vmmon-only/vmmon.o
    Building modules, stage 2.
    MODPOST 0 modules
    make[1]: Leaving directory `/usr/src/linux-headers-3.1.0-1-amd64'
    make -C $PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= postbuild
    make[1]: Entering directory `/tmp/vmware-root/modules/vmmon-only'
    make[1]: `postbuild' is up to date.
    make[1]: Leaving directory `/tmp/vmware-root/modules/vmmon-only'
    cp -f vmmon.ko ./../vmmon.o
    cp: cannot stat `vmmon.ko': No such file or directory
    make: *** [auto-build] Error 1
    make: Leaving directory `/tmp/vmware-root/modules/vmmon-only'
    Unable to install vmmon

    All done, you can now run VMWare WorkStation.
    Modules sources backup can be found in the '/usr/lib/vmware/modules/source-workstation7.1.5-2011-11-14-23:31:34-backup' directory
    [root@gridnev-laptop:/usr/lib/vmware/modules]# uname -a
    Linux gridnev-laptop 3.1.0-1-amd64 #1 SMP Mon Nov 14 08:02:25 UTC 2011 x86_64 GNU/Linux

    and I have no idea what is going on :(

    The first version of patch (to fix 3.0 kernel) works fine for me but since today I`ve being using linux-image-3.1.

    • check that you are applying things on a clean source folder and that this is being run with proper permissions. also check that the modules folder is clean from older modules and try running just the modules installer from the vmware interface instead now

      • Thank you for you reply.
        I`ve tried to play with it and it seems to me there is an issue with linux-kbuild-3.1 package.
        Waiting for updates.

  21. Worked great – thanks!

    openSUSE 12.1
    Linux 3.1.0-1.2-desktop
    VMware workstation 7.1.5

  22. [...] some info after searching on your version of VMWare that some patches may help. Found at link: vmware workstation 7.1.4 fixes to use linux 3.1 | Weltall's blog http://weltall.heliohost.org/wordpre…mware741.patch [...]

  23. Thxs very much.
    Patch works fine.
    Linux gypsy.st.lan 3.1.0-1.2-default #1 SMP Thu Nov 3 14:45:45 UTC 2011 (187dde0) x86_64 x86_64 x86_64 GNU/Linux
    Acer Aspire 8943G :)
    Workstation 7.1.4
    Windows 7.0 x64 Home Premium

  24. I upgraded from Fedora 15 to 16 so had already applied the patch at 15 but also then updated to workstation 7.1.5. I couldn’t get it to work until I used the latest fullvmwarelinux patch. I downloaded the 7.1.5 workstation then did:-

    chmod 755 VMware-Workstation-Full-7.1.5-491717.i386.bundle
    sudo ./VMware-Workstation-Full-7.1.5-491717.i386.bundle -u vmware-workstation
    sudo ./VMware-Workstation-Full-7.1.5-491717.i386.bundle
    tar xvfz fullvmwarelinux310patch.tar.gz
    chmod 755 patch-modules_2.6.39.sh
    sudo ./patch-modules_2.6.39.sh
    …..
    cp -f vsock.ko ./../vsock.o
    make: Leaving directory `/tmp/vmware-root/modules/vsock-only’
    Built vsock module
    Starting vmware (via systemctl): Warning: Unit file of created job changed on disk, ‘systemctl –system daemon-reload’ recommended.
    Job failed. See system logs and ‘systemctl status’ for details.
    [FAILED]
    Unable to start services
    All done, you can now run VMWare WorkStation.

    I ignored the error and started VMware workstation and it worked prefectly. Thanks for all your efforts really makes a difference for everyone running the latest Linux distros.

  25. Fedora 15 (and probably 16 [not tested]) require a different patch because the 3.1 kernel is named 2.6.41 in Fedora. To build vmnet on Fedora 15 (and probably 16 [not tested]) change the version test to:
    KERNEL_VERSION(2, 6, 41)

    Tested with kernel-2.6.41.1-1.fc15.x86_64 on Fedora 15 using VMware Player 4.0.1 x86_64.

    Updated patch:

    diff -Naur vmnet-only.orig/compat_netdevice.h vmnet-only/compat_netdevice.h
    — vmnet-only.orig/compat_netdevice.h 2011-11-14 15:16:55.000000000 +0800
    +++ vmnet-only/compat_netdevice.h 2011-11-21 11:11:16.867032880 +0800
    @@ -47,6 +47,18 @@
    # define net_device device
    #endif

    +/* it looks like these have been removed from the kernel 3.1
    + * probably because the “transition” is considered complete.
    + * so to keep this source compatible we just redefine them like they were
    + * previously
    + */
    +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 41)
    +#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev functions are available. */
    +#define HAVE_FREE_NETDEV /* free_netdev() */
    +#define HAVE_NETDEV_PRIV /* netdev_priv() */
    +#define HAVE_NETIF_QUEUE
    +#define HAVE_NET_DEVICE_OPS
    +#endif

    /*
    * SET_MODULE_OWNER appeared sometime during 2.3.x. It was setting

    • really weird decision from fedora end… for sure they like to make things complex to handle… it might delay issues with broken scripts but will create issues with updated things which need to handle special cases just for fedora (3.0 doesn’t require this patch so you’d need to check two segments of kernel version 2.6.41 included up to 3.0 excluded and 3.1 and upper)

  26. I have Fedora 15 with kernel 2.6.41 x86_64. I downloaded VMware Workstation 8.0.1 for Linux x86_64, installed it and tried to compile it. Of course it failed. But thanks to the Ben Caradoc-Davies comment I was able to compile it and run it without a problem. So thank you very much Ben!

    Here is what I did (you have to do this as root):

    - Went to the dir /usr/lib/vmware/modules/source/ and copied vmnet.tar to vmnet.tar.original.
    - Unpacked vmnet.tar and inside the directory vmnet-only find the file called compat-netdevice.h
    - Edit the file compat-netdevice.h, and find these lines:

    /*
    * In 3.1 merge window feature maros were removed from mainline,
    * so let’s add back ones we care about.
    */
    #if !defined(HAVE_NET_DEVICE_OPS) && \
    LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0)
    # define HAVE_NET_DEVICE_OPS 1
    #endif

    Now change the line that says: LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0)
    to: LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 41)

    - Pack the dir vmnet-only back to vmnet.tar (overwriting the old vmnet.tar)
    - Now recompile the VMware with command: vmware-modconfig –console –install-all
    (it will fail to start VMware Workstation but that’s because you have to restart the computer)
    - Restart the computer and that’s it.

    Hope this helps someone else.

    Thanks to weltall and all of the others for your work on this problem (I used your patch when I had 7.1.4 and 7.1.5 versions and it worked like a charm).

  27. Dear Weltall

    Sorry my english but i have to say: THANK YOU!
    For me your patches is like a kind of magic!! I don’t have the smallest clue how
    is possible create patches for a program of complexity like vmware.
    Again: THANK YOU!!!!

  28. This is great, it worked fine, I will post this in my blog, thanks a lot, I have to use the 7.1.5 version because I have an old Thinkpad G40 and it is not compatible with version 8, Thanks again

  29. Works great on Debian Wheezy 64 Bit!

    THANK YOU!

  30. Thanks. Works for fedora 16 (3.1.2-1.fc16.x86_64) and VMware 7.1.5

  31. Thank you, Thank you, Thank you!

    Trying to install VMWare 7.1.5 on a “fresh” Suse 12.1:

    I was at a loss….. Even after After installing stuff (kernel source, etc.) that needed to be there, and wasn’t part of the Suse install, I was stymied trying to get VMWare 7.1.5 to install.

    I followed a thread of found links to your website and discovered your VMWare fix.

    Your “full patch” successfully installed VMWare 7.1.5 on my new Suse 12.1 install.
    (I did have to install “patch” first for it to get past line #45)

    Yahoo (in its tradition context)!

  32. Works perfect for my VMware Player 3.1.5 on openSUSE 12.1
    in Japanese Environment.

    Great Thanks.

  33. This wonderful patch makes VMware Workstation work on my new Fedora 16 installation, thanks a lot!

    HOWEVER, today Fedora 16 upgraded the Linux kernel, and of course new VMware kernel modules must be built. Unfortunately, starting the vmware service fails like it did before patching :-( And of course the patch refuses to install a second time:
    # ./patch-modules_2.6.39.sh
    /usr/lib/vmware/modules/source/.patched found. You have already patched your sources. Exiting

    So I looked at the patch-modules_2.6.39.sh script and just ran this command manually:
    # vmware-modconfig –console –install-all

    Now vmware starts as it should with the new kernel! Probably this information should be appended to the patch instructions.

    • you just need to directly run vmware and it will install them automatically during launch if needed. There is no need to rerun the script at all or issue other particular commands from command line.

      • You would think so, but just starting vmware didn’t work! Unfortunately, starting the vmware service fails like it did before patching. That’s why my workaround is required…

  34. Latest update of Fedora 16 linux kernel to 3.2.1-3 causes a problem with build VMware workstation 7.1.5 module.

    % vmware-modconfig --console --install-all
    ...
    /tmp/vmware-root/modules/vmmon-only/linux/iommu.c: In function ‘IOMMU_SetupMMU’:
    /tmp/vmware-root/modules/vmmon-only/linux/iommu.c:83:4: error: too few arguments to function ‘iommu_domain_alloc’
    include/linux/iommu.h:68:29: note: declared here
    ...

    I see that there is a kernel 3.2 patch for VMware Workstation 8, but it fails to apply to version 7.1.5. Any ideas?

  35. I just upgraded 32 bit Slackware to a 3.2.2 kernel, and now I’ve lost the use of vmware 7.1.4.
    Any ideas where I can look to patch this problem.
    I can’t find anything with google on this problem.

    Sid

  36. Hervoragend !!! Vielen Dank
    Nachdem ich 2 Tage nach den fehlenden Kernel Headers für den vmware player 2.5 bzw. 3.1.5 gesucht habe, bin ich mehr zufällig auf diesen Blog gestoßen.
    Den full patch ausgepackt, sudo sh patch-modules_2.6.39.sh im Terminal ausgeführt und der player 3.1.5 lässt sich starten. Vorher habe ich mehrmals erfolglos verschiedene *.bundle installiert und etliche Lösungsvorschläge ausprobiert.

    Meine Konfiguration:
    VMware-Player-3.1.5-491717.i386.bundle
    Opensuse 12.1
    Kernel 3.1.9-1.4

    Da ich mehr ein Anwender bin, hat mir der fix und fertige patch sehr geholfen. Programmierung und Kernel compeliererei ist nicht so meine Welt. (und eigentliche schreibe ich auch keine Kommentare)

    Nochmals vielen Dank
    Lothar

  37. Thanks a lot, it works fine
    OpenSUSE 12.1

    Kernel 3.1.9-1.4-default
    7.1.5-491717.x86_64

  38. I attemped to apply the patch and apparently is done, but I get same error when I tried to start vmware player, I use ubuntu 11.10 32 bits and player 3.1.5 both updated today
    any help please?
    regards

    • reboot and/or check dmesg for relevant errors. If ubuntu added additional incompatibilities with vmware player (user land for example or security subsystems) you probably need to ask them.

  39. Hello, I use on Win7 as host VmWorkstation 7.1.5 and as Client a freshly installed openSuse12.1 with installed VmWareTools-8.4 .
    Got compilers error and so I tried your patch “#./patch_modules_2.6.39.sh”, but I there are new problems:
    Your patch messages is: “VmWare is not installed (properly) on this PC”
    So I looked into “patch_modules_2.6.39.sh” and found that its hardwired to “/usr/lib/vmware”. The vmware installer copy the sources by default to “/usr/lib/vmware-tools”. I changed this line.
    But your script still send the message “.. not installed..”
    Maybe I did the wrong steps?
    I installed vmware-tools but didn’t run #sh /usr/bin/vmware-config.pl” because I think: First patching with your “patch_modules_2.6.39.sh” and than compiling via “vmware-config.pl”. Is that right?
    Greetings Leo

    • These are host kernel modules patches they won’t fix guest modules. Anyway you don’t really need fixes much. The majority of things needed builds or is embedded in the kernel itself. You might try to port fixes in the host patches to the guest manually, in some cases it would work.

      • Hello Weltall,
        thank for your reply, i was completly wrong with the use your patch!
        Sure I used it in the guest Linux: Thats why the call of “vmware-installer -l” in your patch could not work. I searched for hours, to find a the vmware-installer in the guest linux system, but there was’nt such the binary.

        Anyway, I got a couple of errors (Error: SPIN_LOCK_UNLOCK) when I compile the vwmare-tools on the guest SUSE12.1:
        ‘Shrinking’ in the VmTools will work, virtual GraphicAdapter works and virtual soundcard works too.
        But there a problem vmhgf to have access to hosts (win7) shared nfts directories.
        Maybe, you have an idea. Thank you in advance
        Leo

        • for spinlock it’s easy just open the patch you’ve wrongly got search for it and replicate how it’s fixed there in the sources giving you the error

  40. use this commands :)

    cp -R /usr/lib/vmware/modules/source/
    cp -R /usr/lib/vmware/modules/source/ /tmp/vmware
    cd /tmp/vmware/source
    wget http://weltall.heliohost.org/wordpress/wp-content/uploads/2011/05/vmware2.6.39patchv3.tar.bz2
    tar -jxvf vmware2.6.39patchv3.tar.bz2
    for i in ./*.tar; do tar -xf $i; done
    for i in ./*.tar; do mv $i $i.orginal; done
    patch -t -f -p1 < vmware2.6.39fixedv3.patch
    tar cf vmblock.tar vmblock-only
    tar cf vmci.tar vmci-only
    tar cf vmmon.tar vmmon-only
    tar cf vmnet.tar vmnet-only
    tar cf vsock.tar vsock-only
    cp -vf *.tar /usr/lib/vmware/modules/source/

    After this restart you're pc laptop and start vmware workstation again :)

    I strongly recommend a boot to give this effect :)

  41. i forgot to mention run that as root :)

    • Hey guys, I am a real newbie… Been working with Windozzze till now. Tried ubuntu, and was running VMware workstation (which I own a license for) got that working by following examples, but I just went to linux mint 12 KDE, I have tried all these things and can’t get this to work. I tried the above steps (reply 40) and ran it as root, but got errors at everything from :

      for i in ./*.tar; do tar -xf $i; done
      for i in ./*.tar; do mv $i $i.orginal; done
      patch -t -f -p1 < vmware2.6.39fixedv3.patch
      tar cf vmblock.tar vmblock-only
      tar cf vmci.tar vmci-only
      tar cf vmmon.tar vmmon-only
      tar cf vmnet.tar vmnet-only
      tar cf vsock.tar vsock-only
      cp -vf *.tar /usr/lib/vmware/modules/source/

      I know you shouldn't have to do this, I should be able to work it out, but can someone walk me through each step and what it actually does so I learn something, not just do it parot fashoin? PLEASE! I would be ever appreciative.

      Thanks for your help,

      Jim

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>