Parallels Tools do not compile with kernels 2.6.39 and 3.0

Discussion in 'Linux Virtual Machine' started by DRemesov, Aug 1, 2011.

  1. DRemesov

    DRemesov Bit poster

    Messages:
    7
    Hello

    Building of Parallels Tools using kernel headers 2.6.39 and 3.0 fails with

    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c: In function ‘prlfs_get_sb’:
    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:247:2: error: implicit declaration of function ‘get_sb_nodev’
    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c: At top level:
    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:264:2: error: unknown field ‘get_sb’ specified in initializer
    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:264:2: warning: initialization makes integer from pointer without a cast
    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:264:2: error: initializer element is not computable at load time
    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:264:2: error: (near initialization for ‘prl_fs_type.fs_flags’)

    In kernel 2.6.39 function get_sb_nodev is deprecated and field get_sb in file_system_type structure is deprecated too
     
  2. JEarles

    JEarles Hunter

    Messages:
    119
    You can see the changes I had to make to get Parallels Tools to compile for Chakra (2.6.39) over in this thread
     
  3. DRemesov

    DRemesov Bit poster

    Messages:
    7
    On 3.0 it compiles but makes kernel oops on loading prl_tg
    BTW the patch has an inconsistency in prl_freeze/prl_fs_freeze.c
    kern_path accepts struct path* as parameter 3
     
  4. JEarles

    JEarles Hunter

    Messages:
    119
    Thank you. I found a subsequent article that resolved that issue. The parameter should be changed from: &nd to &(nd.path).
     
  5. JEarles

    JEarles Hunter

    Messages:
    119
    Install on Ubuntu 11.10 Alpha (Linux 3.0.0)

    I just downloaded the latest "current" build of Ubuntu 11.10. It currently has Linux 3.0.0-7. After applying my patch I was able to reboot and Parallels seems to think its tools are loaded.

    Looking at the install log it appears that everything compiled fine and the install passed, but there was a problem with the DKMS modules. I don't now if that is because of something to do with Parallels Tools of because I am using Alpha software.

    The main parallels log shows this on restart:

    There will undoubtedly be an official update, probably after 11.10 is released, but it looks like my patch takes care of most of the issues for 2.36.9 and 3.0.0. YMMV.

    Attached is a screen shot.
     

    Attached Files:

  6. DRemesov

    DRemesov Bit poster

    Messages:
    7
    Confirm
    with 3.0.0-7 it seems to work fine
     
  7. mohdf

    mohdf Member

    Messages:
    25
  8. mohdf

    mohdf Member

    Messages:
    25
    u mean both this line ? both need to be change ? and how about the kernel version ?

    - err = path_lookup(path, LOOKUP_FOLLOW, &nd);
    +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
    + err = kern_path(path, LOOKUP_FOLLOW, &(nd.path));
    +#else
    + err = path_lookup(path, LOOKUP_FOLLOW, &nd);
    +#endif
     
  9. mohdf

    mohdf Member

    Messages:
    25
    mind to share / post your patch here ?
     
  10. mohdf

    mohdf Member

    Messages:
    25
    $ patch -p1 < parallels_patch.txt
    patching file installer/detect-xserver.sh
    patching file kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c
    Hunk #1 FAILED at 240.
    Hunk #2 FAILED at 260.
    2 out of 2 hunks FAILED -- saving rejects to file kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c.rej
    patching file kmods/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze.c
    Hunk #1 FAILED at 55.
    1 out of 1 hunk FAILED -- saving rejects to file kmods/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze.c.rej
    patching file kmods/prl_pv/Paravirt/Guest/Linux/pv_main.c
    Hunk #1 FAILED at 51.
    1 out of 1 hunk FAILED -- saving rejects to file kmods/prl_pv/Paravirt/Guest/Linux/pv_main.c.rej
     
  11. JEarles

    JEarles Hunter

    Messages:
    119
    Yes... I am using 6.0.12094, and starting with a copy of their tools.

    Did you unzip and untar the kmods/prl_mod.tar.gz file?

    I just ran the same command in my Chakra environment and all patches worked.

     
  12. DRemesov

    DRemesov Bit poster

    Messages:
    7
    version 6.0.12094
    Artifacts are still there in ubuntu 11.04 using just kernel from 11.10
    so it's not the kernel issue
     
  13. MarkoK

    MarkoK Junior Member

    Messages:
    13
    Is this patch also usable for Parallels 5 or bound to version 6???

    Is it also needed for a kernel 2.6.37.6?
     
    Last edited: Aug 7, 2011
  14. JEarles

    JEarles Hunter

    Messages:
    119
    My patch was done to get Parallels 6 (6.0.12094) to support 2.6.39... it already supports 2.6.37.
     
  15. MarkoK

    MarkoK Junior Member

    Messages:
    13
    I see.
    I figured now that it is PD5 which is really and very likely never will support current OpenSUSEs. :-(
    PD5 users are forced to upgrade to PD6.
     
  16. loderunner

    loderunner Bit poster

    Messages:
    1
    I made your patch work for ubuntu 11.10 w/kernel 3.0.0-9. However gdm fails to start. I tried what the poster in the gnome3 thread stated to do : i.e. create a symlink from /bin/true to /usr/lib/gnome-session/gnome-session-check-accelerated-helper

    Error I am receiving is the following:
    from /var/log/gdm/:0.log -> error setting MTRR (base =0xb0000000, size=0x08000000, type=1) Invalid argument (22).

    Any ideas?
     
  17. JEarles

    JEarles Hunter

    Messages:
    119
    I didn't experience any major issues:

    1) Download 11.10 daily build - oneiric-desktop-amd64+mac.iso
    2) Install inside Parallels 6.0.12094
    3) ln -s /usr/lib /usr/lib64
    4) Mount parallels tools
    5) Create a working directory
    6) Copy parallels tools to working directory
    7) unzip and untar kmods directory
    8) install patch package
    9) Download patch file (http://forum.parallels.com/showpost.php?p=452934&postcount=6) to working directory
    10) Apply patch
    11) Run install from working directory
    12) Reboot
    13) Install gnome-shell and gnome-session packages
    13) Reboot
    14) Choose GNOME session and login

    I see the Gnome 3 desktop, and I didn't need to create a bin/true symlink.

    NOTE: I didn't try to resolve my DKMS issue. My parallels-tool-install.log still reports that the DKMS modules were not added.

    EDIT: The most recent versions of 11.10 use LightDM instead of GDM.
     
    Last edited: Sep 2, 2011
  18. Ramy1989

    Ramy1989 Bit poster

    Messages:
    9
    I applied the patch, when i try to run the installer it says:
    ./install: line 451: ./installer/installer.x86_32: Permission denied
    It has executable bit.
     
  19. JEarles

    JEarles Hunter

    Messages:
    119
    It must be run as root, try:

    sudo ./install
     
  20. RobertoCA

    RobertoCA Bit poster

    Messages:
    2
    The patch JEarles provided works, but it wasn't working for me on Build 6.0.12106.

    After reading the installer script I realized I had to re-tar up the kmods directory after applying the patch. I basically did something like this:

    cd kmods
    tar xzf prl_mod.tar.gz
    mv prl_mod.tar.gz ..
    cd ..
    patch -p1 < /path/to/parallels_patch.txt
    cd kmods
    tar czf /tmp/prl_mod.tar.gz *
    rm -rf *
    mv /tmp/prl_mod.tar.gz .
    cd ..
    ./install

    Hope this helps someone else.
     

Share This Page