Tuesday, April 30, 2013

VMware Workstation 8 and Linux Kernel 3.8...

So I recently upgraded to Kubuntu 13.04, which also means upgrading to Linux Kernel 3.8. However, as with most Kernel upgrades my VMware install fails to upgrade. Most of the information out there is for VMware Workstation 9 (W9), but I'm running Workstation 8 (W8). Fortunately the fix for W9 is just as valid, but the lines numbers are a little different.

Here's what you need to do:

1. Linux changed where the "version.h" header file is for the source. The fix is easy - a simply symlink:

# ln -s /usr/src/linux-headers-`uname -r`/include/generated/uapi/linux/version.h /usr/src/linux-headers-`uname -r`/include/linux/version.h

Now that is specifically for Debian derived distros - you distro might put the headers somewhere else. And of course, you might be trying to support a kernel other than your running kernel - so adjust it as necessary.

This will allow the build tool for VMware's modules to actually run.

2. Workstation's VMCI module fails to build.

The Workstation 9 patch is available here: http://mafio.host56.com/2013/03/linux-kernel-3-8-vmware-failed-to-build-vmci/

For Workstation 8, you can go here: http://communities.vmware.com/message/2234875#2234875. It's also below:
--- vmci-only/linux/driver.c    2013-03-01 02:46:05.000000000 -0500
+++ vmci-only.fixed/linux/driver.c  2013-04-30 11:05:25.923550628 -0400
@@ -124,7 +124,7 @@
    .name     = "vmci",
    .id_table = vmci_ids,
    .probe = vmci_probe_device,
-   .remove = __devexit_p(vmci_remove_device),
+   .remove = vmci_remove_device,

@@ -1741,7 +1741,7 @@

-static int __devinit
+static int
 vmci_probe_device(struct pci_dev *pdev,           // IN: vmci PCI device
                   const struct pci_device_id *id) // IN: matching device ID
@@ -1969,7 +1969,7 @@

-static void __devexit
+static void
 vmci_remove_device(struct pci_dev* pdev)
    struct vmci_device *dev = pci_get_drvdata(pdev);

1 comment:

TemporalBeing said...

Here's a simple Bash script for adding the header file:




function printUsage()
    local program="${1}"
    echo "Usage: ${program} "

function addVersionHeader()
    local -i retValue=0
    local myCWD=`pwd`
    local srcVersionHeader="${myCWD}/include/generated/uapi/linux/version.h"
    local dstVersionHeader="${myCWD}/include/linux/version.h"

    if [ -f "${dstVersionHeader}" ]; then
        echo "Version Header Already Exists"
        let -i retValue=0
        if [ -f "${srcVersionHeader}" ]; then
            ${LN} -s "${srcVersionHeader}" "${dstVersionHeader}"
            let -i retValue=$?
            echo "Generated UAPI Version Header Does not exist. Did they change it again?"
            let -i retValue=-2
    return ${retValue}

let -i shellReturnValue=0
if [ -n "${LINUX_KERNEL_SRC_PATH}" ]; then
    pushd "${LINUX_KERNEL_SRC_PATH}" 1>&2 /dev/null
        let -i shellReturnValue=$?
    popd 1>&2 /dev/null
    printUsage "${0}"
    let -i shellReturnValue=-1

exit ${shellReturnValue}