vmware-specific-specific 5.5.x and kernel 2.6.29-2.6.30

Posted on April 21st, 2009

You can follow any responses to this entry through the RSS 2.0 feed.
vmware startup

Once again, here’s a patch to have vmware 5.5.x (and vmware server 1.0.x AFAIK) working with the latest kernels 2.6.29 and 2.6.30.

Sorry for the delay ;) As usual this patch only work on x86.

Since I didnt take the time to work around the un-exported init_mm symbol in the kernel, this time the patch require patching your kernel. Please follow the README included in the archive, or in simple words, just apply the 2.6.29-export-init_mm.patch file on your kernel source tree and recompile/reboot before upgrading vmware.

As usual, have fun ;p

Update:

Fixed missing commit_creds(), thanks dpalffy
Fixed memory leak
Works without modification on 2.6.30. The same symbol export patch can be used.

vmware-update-2.6.29-5.5.9-3.tar.bz2

21 Responses to “vmware-specific-specific 5.5.x and kernel 2.6.29-2.6.30”

  1. hyper_ch says:

    Thx for notifying me of the update :) The patch isn’t necessary anymore for Jaunty (but a different one is required).

  2. dpalffy says:

    In vmmon_only/linux/driver.c: __LinuxDriver_Ioctl() you missed a commit_creds() I think, new is never commited.

  3. Cyber says:

    works great with vmware-server 1.0.9 and kernel 2.6.29.1

    big thanks for your work!

    >>>cyber

  4. Cyber says:

    Hi!

    now I have got big problems … after about 4½ hours running one vmware my hostsystem starts to kill processes with oom …
    I have got statistics with munin, I can see increasing slab_cache constantly.

    do you think that your modules are affacted by a memory leak?

    I’ve used with kernel 2.6.29 also modules from it-psycho.de – but I’ve got problems with them to virtualize a 2.6 vmware …

    I hope you read my message … ;)

    kind regards, Alois

  5. Jonas says:

    I can second this. Do *NOT* use this patch on vmware 1.0.9.
    It crashes your VM’s after some minutes or hours due to a memory leak.

  6. Cyber says:

    the memory leak is in vmmon module – perhaps in combination with virtual disc access (I emulate IDE) – as soon as I do much write / read access slap_cache increases.

    kind regards, Alois

  7. kang says:

    Cyber, Jonas,
    Have you tried the “-2″ version of this patch?
    The vmmon diff isnt very big, I didn’t see anything obvious (beside that the patch isnt very very nice :)
    It could be some error in the module that wasnt triggered with previous kernels as well.

  8. Cyber says:

    Hi kang,

    jes, this is version -2 of this patch.

    with “slaptop” I can see kmalloc-128 increasing instantly – per second about 100k. perhaps this helps … thanks. ;)

    >>>cyber

  9. Cyber says:

    hi kang,

    with debug-output I’ve found the function which allocates more and more memory – can you imagine why?

    thanks a lot for your help! (:

    kind regards, Alois

    vmmon-only/linux/hostif.c

    void *
    HostIF_AllocKernelMem(size_t size, int wired)
    {
    void * ptr = kmalloc(size, GFP_KERNEL);
    printk(KERN_NOTICE “vmware-kmalloc3 %i\n”,size);

    if (ptr==NULL) {
    Warning(“HostIF_AllocKernelMem failed (size=%p)\n”, (void*)size);
    }

    return ptr;
    }

  10. kang says:

    that’s the memory allocating function (stating the obvious i know ;)
    Anyway, vmware wraps around it with this HostIF_AllocKernelMem, so, I don’t know which debug output you used, but maybe you have the call to the previous function? Unless something in kmalloc changed (or kmem_cache)

    I will probably only be able to look it up on the next monday unless you have to function called and we get lucky. or maybe someone else will post a patch in between :)

  11. Cyber says:

    hi kang,

    I tried to put debug-output (debug-output from anove see the posted function – the printk(KERN_NOTICE “vmware-kmalloc3 %i\n”,size); writes debug-messages to klogd so I was able to detect that this function is affected) in the whole vmmon-source, where HostIF_AllocKernelMem is called.
    I tried it with the method as above, bug as soon as I add similar lines the vmmon-module is not able to compile – I am sorry, I am not able to “speak” c … ):

    it would be great if you can take a look at it! ;)

    kind regards, Alois

  12. Alex says:

    HI KANG! nice site! xD

  13. Sanjay says:

    Need some help :)

    [root@sunjoy 2.6.29.2-52.fc10.x86_64]# patch -p1 -i /home/radhju/Desktop/downloads/vmware-update-2.6.29-5.5.9/2.6.29-export-init_mm.patch
    can’t find file to patch at input line 5
    Perhaps you used the wrong -p or –strip option?
    The text leading up to this was:
    ————————–
    |diff –git a/arch/x86/kernel/init_task.c b/arch/x86/kernel/init_task.c
    |index 5b3ce79..3d01e47 100644
    |— a/arch/x86/kernel/init_task.c
    |+++ b/arch/x86/kernel/init_task.c
    ————————–
    File to patch:

  14. Cyber says:

    hey sanjay,

    you have to patch your linux kernel source (usually at /usr/src/linux) and there the file arch/x86/kernel/init_task.c

    ;)

    @kang: i’m daily visiting your page with hope you will find the memory leak … ):

    ;)

    >>>cyber

  15. kang says:

    hi cyber, please download the new archive, this fixes the memory leak i believe you have, please tell me if it works now

  16. Cyber says:

    Hi kang,

    yeah, fixed. ((:

    not memory does not increase any more! ((:

    Thanks a lot for your professional work!!!

    Great!

    >>>cyber

  17. Jochen Wiedmann says:

    Any chance to get rid of the kenel patch?

  18. Paul Belanger says:

    I’m trying to get VMWare Workstation 5.5.9 running. I’m willing to attempt to patch the kernel and I think I have the source files but… ugh, I don’t have an init_task.c file. There’s an init_task.h but no reference to init_mm in it. What now?

    I just installed Fedora 11, 2.6.29.4-167.fc11.x86_64.

  19. Paul Belanger says:

    Alright, I kept digging and discovered I didn’t have the kernel source installed. Found this article …

    http://www.howtoforge.com/kernel_compilation_fedora_p2

    … and VMWare works now! Thanks for the patch

  20. John Lumby says:

    Thanks for this patch. It works fine for me but I have two questions on the code -
    one relating to yours and second relating to the original vmware code :
    1. in linux/driver_compat.h LinuxDriverLockedNoPage() (file added by http://www.insecure.ws)
    after line
    pg = fdata->pgoff;
    need
    pg = VMMON_MAP_OFFSET(pg); /* jel */
    2. linux kernel #defines
    #define VM_FAULT_SIGBUS 0×0002
    but compat_mm.h has
    #ifndef NOPAGE_SIGBUS
    #define NOPAGE_SIGBUS (0)
    #endif
    and I believe vmware’s use of its NOPAGE_SIGBUS is same as linux kernel’s use of its VM_FAULT_SIGBUS
    so shouldn’t the vmware define be
    #define NOPAGE_SIGBUS (2)

  21. George says:

    Hello,

    I am having problems with this patch. I use 2.6.30.5-43 PAE kernel and I cannot install vmwares server ANY VERSION. I get this error, and I do not know if there is something I made wrong or the patch is not for my kernel. Thank you in advance.

Leave a Reply