HOWTO – 64-bit Kernel 2.6.31 and VMware Server 2.0.1…


Assuming you have already installed the 2.6 31 kernel, this link has a patch and script to modify the modules VMware compiles when you run the vmware-config.pl script.  The script is for 2.6.30.4 and later kernels, and works fine for 2.6.31.

  1. Run the vmware-install.sh script that came with VMware Server 2.0.1, but DO NOT run the vmware-config.pl script at the end.
  2. Get the patch script – vmware-server.2.0.1_x64-modules-2.6.30.4-fix.sh and make it executable.
  3. Get the patch – vmware-server.2.0.1_x64-modules-2.6.30.4-fix.patch.
  4. Make a directory, say, /usr/src/vmware-patches and cd to it.
  5. Copy the patch, the script and the four module sources (/usr/lib/vmware/modules/source/*.tar) to the patch directory you are now in.
  6. Run the patch – it should build for 64-bit systems.  I do not know about 32-bit systems…
  7. Run the vmware-config.pl command, and install as normal.

There have been reports of minor script errors, so you may need to make some slight edits.  Or you may not – I had no trouble.  If you need to reinstall, make sure you stop the vmware services, rmmod the vmware modules, and delete everything in the /usr/lib/vmware/modules directory before re-running the installer-patch-config steps above.  You will also need to delete the modules from your system – running the installer should generate a failure message telling you what files to delete from where.  Successfully running the installer will put everything you need back in the /usr/lib/vmware/modules directory.

Big thanks to meubeukeu and michelemase for their work in making these patches!

15 Responses

  1. Hi, i just tried your step and it still fails…here is a copy of the errors i get when i run the *.sh script.
    ===============================
    Found tar file for vsock module
    Found tar file for vmmon module
    Found tar file for vmci module
    Found tar file for vmnet module
    Using patch file: /doc/vmware/patch/vmware-server.2.0.1_x64-modules-2.6.30.4-fix.patch
    Using module directory: /usr/lib/vmware/modules/source
    Using backup directory: /usr/lib/vmware/modules/source-backup
    Untarring vsock.tar
    Untarring vmmon.tar
    Untarring vmci.tar
    Untarring vmnet.tar
    Testing patch
    patching file vmci-only/Makefile
    Hunk #1 FAILED at 113.
    1 out of 1 hunk FAILED — saving rejects to file vmci-only/Makefile.rej
    patching file vmmon-only/linux/driver.c
    Hunk #1 FAILED at 1984.
    1 out of 1 hunk FAILED — saving rejects to file vmmon-only/linux/driver.c.rej
    patching file vmmon-only/linux/hostif.c
    Hunk #3 FAILED at 3660.
    1 out of 3 hunks FAILED — saving rejects to file vmmon-only/linux/hostif.c.rej
    patching file vmmon-only/include/x86svm.h
    patching file vmmon-only/Makefile
    Hunk #1 FAILED at 113.
    1 out of 1 hunk FAILED — saving rejects to file vmmon-only/Makefile.rej
    patching file vmnet-only/Makefile
    Hunk #1 FAILED at 113.
    1 out of 1 hunk FAILED — saving rejects to file vmnet-only/Makefile.rej
    patching file vmnet-only/netif.c
    Hunk #3 succeeded at 324 with fuzz 2.
    patching file vsock-only/Makefile
    Hunk #1 FAILED at 113.
    1 out of 1 hunk FAILED — saving rejects to file vsock-only/Makefile.rej
    Sorry, problem with the patch, I can’t apply it

    • Try the link in the article to the VMware Communities site – there are four pages total with links to other posts on this patch – page 1 in particular has lots of instructions to try. Are you using a clean install of VMware Server 2.0? I cannot vouch that this patch will work for different products (like Player or Workstation). Is your install using the default directories? If not, you will need to change the script’s VMMODDIR from “/usr/lib/vmware/modules” to the actual path on your system.
      Sorry I cannot be more helpful…

  2. Thanks a lot for the detailed instructions. The script i downloaded contained CRLF end of line characters. It had to be converted to Unix end-of-line characters to work.

  3. AWH! & ARGH!

    Sometimes I hate this world… Your link directs me to a login page… I login, login, login, reregister, relogin relogin and so on. I cannot reach far enough to get the scripts… Only to login page.

    I FRIKKEN HATE THIS SHIT.

    • Sorry, JOR. I tried the link after seeing your comment, and it worked fine – no login prompt occurred. Perhaps your browser is caching something?

  4. Wonderfull article. Nice to see great sharing.

  5. thanks for the article, very helpful.

  6. well i can’t apply the patch ´cause the script have errors, i’m on bash but i was run the script with: ./script.sh
    sh srcipt.sh and bash script.sh

    i know the head of the script say ” /us/bin/sh
    but this is a sintaxis mistake on script

    rc0:/home/tenex/vmware-server# ./vmware-server.2.0.1_x64-modules-2.6.30.4-fix.sh
    -su: ./vmware-server.2.0.1_x64-modules-2.6.30.4-fix.sh: /bin/sh^M: intérprete erróneo: No existe el fichero o el directorio
    rc0:/home/tenex/vmware-server# sh vmware-server.2.0.1_x64-modules-2.6.30.4-fix.sh
    vmware-server.2.0.1_x64-modules-2.6.30.4-fix.sh: 43: Syntax error: word unexpected (expecting “do”)

    and with all my tryies is the same error on the same line

    for TARFILE in $TARS
    do
    BACKFILE=”${BACKDIR}/${TARFILE}”
    if [ ! -r “$BACKFILE” ]; then
    echo “Backing up $TARFILE to $BACKFILE”
    cp -a -f “$TARFILE” “$BACKFILE”
    if [ ! -r “$BACKFILE” ]; then
    echo “Sorry, unable to write backup file”
    echo “Did you remember to become root before running this script?”
    exit 1
    fi
    fi
    done

    • @TeNeX:

      Just convert the dos line endings to unix, e.g. using vi.

      • hi man thks for your answer 🙂 was very helpful 🙂

        but i have a problem…

        None of the pre-built vmmon modules for VMware Server is suitable for your
        running kernel. Do you want this program to try to build the vmmon module for
        your system (you need to have a C compiler installed on your system)? [yes]

        Using compiler “/usr/bin/gcc-4.3”. Use environment variable CC to override.

        What is the location of the directory of C header files that match your running
        kernel? [/lib/modules/2.6.32-trunk-686/build/include]

        Extracting the sources of the vmmon module.

        Building the vmmon module.

        Using 2.6.x kernel build system.
        make: se ingresa al directorio `/tmp/vmware-config0/vmmon-only’
        make -C /lib/modules/2.6.32-trunk-686/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
        make[1]: se ingresa al directorio `/usr/src/linux-headers-2.6.32-trunk-686′
        CC [M] /tmp/vmware-config0/vmmon-only/linux/driver.o
        In file included from /tmp/vmware-config0/vmmon-only/linux/driver.c:31:
        /tmp/vmware-config0/vmmon-only/./include/compat_wait.h:78: error: conflicting types for ‘poll_initwait’
        /usr/src/linux-headers-2.6.32-trunk-common/include/linux/poll.h:70: error: previous declaration of ‘poll_initwait’ was here
        In file included from /tmp/vmware-config0/vmmon-only/./common/vmx86.h:32,
        from /tmp/vmware-config0/vmmon-only/linux/driver.h:29,
        from /tmp/vmware-config0/vmmon-only/linux/driver.c:101:
        /tmp/vmware-config0/vmmon-only/./include/x86msr.h:164:1: warning: “MSR_THERM2_CTL” redefined
        In file included from /usr/src/linux-headers-2.6.32-trunk-common/arch/x86/include/asm/msr.h:4,
        from /usr/src/linux-headers-2.6.32-trunk-common/arch/x86/include/asm/processor.h:21,
        from /usr/src/linux-headers-2.6.32-trunk-common/include/linux/prefetch.h:14,
        from /usr/src/linux-headers-2.6.32-trunk-common/include/linux/list.h:6,
        from /usr/src/linux-headers-2.6.32-trunk-common/include/linux/module.h:9,
        from /tmp/vmware-config0/vmmon-only/./include/compat_module.h:27,
        from /tmp/vmware-config0/vmmon-only/linux/driver.c:26:
        /usr/src/linux-headers-2.6.32-trunk-common/arch/x86/include/asm/msr-index.h:225:1: warning: this is the location of the previous definition
        /tmp/vmware-config0/vmmon-only/linux/driver.c: In function ‘LinuxDriverSyncCallOnEachCPU’:
        /tmp/vmware-config0/vmmon-only/linux/driver.c:1423: error: too many arguments to function ‘smp_call_function’
        /tmp/vmware-config0/vmmon-only/linux/driver.c: In function ‘LinuxDriver_Ioctl’:
        /tmp/vmware-config0/vmmon-only/linux/driver.c:1987: error: ‘struct task_struct’ has no member named ‘euid’
        /tmp/vmware-config0/vmmon-only/linux/driver.c:1987: error: ‘struct task_struct’ has no member named ‘uid’
        /tmp/vmware-config0/vmmon-only/linux/driver.c:1988: error: ‘struct task_struct’ has no member named ‘fsuid’
        /tmp/vmware-config0/vmmon-only/linux/driver.c:1988: error: ‘struct task_struct’ has no member named ‘uid’
        /tmp/vmware-config0/vmmon-only/linux/driver.c:1989: error: ‘struct task_struct’ has no member named ‘egid’
        /tmp/vmware-config0/vmmon-only/linux/driver.c:1989: error: ‘struct task_struct’ has no member named ‘gid’
        /tmp/vmware-config0/vmmon-only/linux/driver.c:1990: error: ‘struct task_struct’ has no member named ‘fsgid’
        /tmp/vmware-config0/vmmon-only/linux/driver.c:1990: error: ‘struct task_struct’ has no member named ‘gid’
        /tmp/vmware-config0/vmmon-only/linux/driver.c:2007: error: too many arguments to function ‘smp_call_function’
        make[4]: *** [/tmp/vmware-config0/vmmon-only/linux/driver.o] Error 1
        make[3]: *** [_module_/tmp/vmware-config0/vmmon-only] Error 2
        make[2]: *** [sub-make] Error 2
        make[1]: *** [all] Error 2
        make[1]: se sale del directorio `/usr/src/linux-headers-2.6.32-trunk-686′
        make: *** [vmmon.ko] Error 2
        make: se sale del directorio `/tmp/vmware-config0/vmmon-only’
        Unable to build the vmmon module.

        i delete all about
        /usr/lib/vmware/modules/source
        and other locations but the patch have problems like:

        rc0:/usr/lib/vmware/modules/source# sh vmware-server.2.0.1_x64-modules-2.6.30.4-fix.sh
        Found tar file for vsock module
        Found tar file for vsock-temp module
        Found tar file for vmnet-temp module
        Found tar file for vmnet module
        Found tar file for vmci module
        Found tar file for vmci-temp module
        Found tar file for vmmon module
        Found tar file for vmmon-temp module
        Using patch file: /usr/lib/vmware/modules/source/vmware-server.2.0.1_x64-modules-2.6.30.4-fix.patch
        Using module directory: /usr/lib/vmware/modules/source
        Using backup directory: /usr/lib/vmware/modules/source-backup
        Backing up ./vsock.tar to /usr/lib/vmware/modules/source-backup/./vsock.tar
        Backing up ./vsock-temp.tar to /usr/lib/vmware/modules/source-backup/./vsock-temp.tar
        Backing up ./vmnet-temp.tar to /usr/lib/vmware/modules/source-backup/./vmnet-temp.tar
        Backing up ./vmnet.tar to /usr/lib/vmware/modules/source-backup/./vmnet.tar
        Backing up ./vmci.tar to /usr/lib/vmware/modules/source-backup/./vmci.tar
        Backing up ./vmci-temp.tar to /usr/lib/vmware/modules/source-backup/./vmci-temp.tar
        Backing up ./vmmon.tar to /usr/lib/vmware/modules/source-backup/./vmmon.tar
        Backing up ./vmmon-temp.tar to /usr/lib/vmware/modules/source-backup/./vmmon-temp.tar
        Untarring vsock.tar
        Untarring vsock-temp.tar
        Sorry, vsock-temp.tar tarball failed to extract the directory vsock-temp-only

  7. Well this almost works.. I keep getting “virtual ethernet” failed on startup and “VMware Server is installed, but it has not been (correctly) configured” at various times.. I copied, moved, obliterated that flag file but it keeps coming back.. And I can get a login prompt on the web interface but when I try to log in, its “not responding”.. This is the last time I’m trying to get this POS running.. I quit.

  8. Works on my 64-bit kubuntu kamic (9.10). You rock! 😀

  9. Заказ успешно забрал Закладкой, созвонились, курьер c dillerspy.ru оказался на редкость шустрым. Всё чётко и без траблов, будем брать.

  10. Магаз vladklad.ru ровный – 100%…Работает закладками во Владивостоке Подтверждаю, все пришло как надо! Серега..

Leave a comment