Unable to install Parallels Tools on Linux kernel 5.10

Discussion in 'Linux Virtual Machine' started by MikhailB, Jan 7, 2021.

  1. MikhailB

    MikhailB Bit poster

    Messages:
    3
    I am using Parallels for a while for managing Linux VM on my mac. Recently I tried to install a Linux instance with a new Linux 5.10. The installation itself went smooth and everything works as expected, except Parallels Tools, which I need to have shared clipboard on my mac and linux. Is there a way to fix this issue?
    The root cause of the issues is the breaking changes in new kernel probably. I see the following errors:
    Code:
    Parallels Tools 16.0.1-48919 Installer started.
    2021-01-07T11:55:30+0100: Failed to setup console printk level.
    2021-01-07T11:55:31+0100: execCmd: ./install --check [0]
    2021-01-07T11:55:31+0100: execCmd: ./installer/detect-xserver.sh -v >/dev/null 2>&1 [0]
    2021-01-07T11:55:32+0100: execCmd: ./installer/pm.sh --check gtools [0]
    Started installation of Parallels Guest Tools version '16.0.1.48919'
    
    Error during report about start installation of parallels tools.
    Thu Jan 7 11:55:33 CET 2021
    Start installation or upgrade of Guest Tools
    new version of parallels tools
    Installed Guest Tools were not found
    Register service to install new Guest Tools
    Perform installation into the /usr/lib/parallels-tools directory
    make: Entering directory '/usr/lib/parallels-tools/kmods'
    Will use compiler CC="cc".
    Compiler version "cc (GCC) 10.2.0"
    cd prl_eth/pvmnet && make CC=cc
    make[1]: Entering directory '/usr/lib/parallels-tools/kmods/prl_eth/pvmnet'
    make -C /lib/modules/5.10.4-arch2-1/build M=/usr/lib/parallels-tools/kmods/prl_eth/pvmnet CC=cc
    make[2]: Entering directory '/usr/lib/modules/5.10.4-arch2-1/build'
      CC [M]  /usr/lib/parallels-tools/kmods/prl_eth/pvmnet/pvmnet.o
      LD [M]  /usr/lib/parallels-tools/kmods/prl_eth/pvmnet/prl_eth.o
      MODPOST /usr/lib/parallels-tools/kmods/prl_eth/pvmnet/Module.symvers
      CC [M]  /usr/lib/parallels-tools/kmods/prl_eth/pvmnet/prl_eth.mod.o
      LD [M]  /usr/lib/parallels-tools/kmods/prl_eth/pvmnet/prl_eth.ko
    make[2]: Leaving directory '/usr/lib/modules/5.10.4-arch2-1/build'
    make[1]: Leaving directory '/usr/lib/parallels-tools/kmods/prl_eth/pvmnet'
    cd prl_tg/Toolgate/Guest/Linux/prl_tg && make CC=cc
    make[1]: Entering directory '/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg'
    1: /lib/modules/5.10.4-arch2-1/build
    2: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg
    3: 20210107
    4: 1.7.1
    Start compile prl_tg...
    make -C /lib/modules/5.10.4-arch2-1/build M=/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg SRCROOT=/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg CC=cc modules
    make[2]: Entering directory '/usr/lib/modules/5.10.4-arch2-1/build'
    1: /lib/modules/5.10.4-arch2-1/build
    2: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg
    3: 20210107
    4: 1.7.1
      CC [M]  /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.o
      CC [M]  /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_call.o
      LD [M]  /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prl_tg.o
    1: /lib/modules/5.10.4-arch2-1/build
    2: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg
    3: 20210107
    4: 1.7.1
      MODPOST /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Module.symvers
      CC [M]  /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prl_tg.mod.o
      LD [M]  /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prl_tg.ko
    make[2]: Leaving directory '/usr/lib/modules/5.10.4-arch2-1/build'
    make[1]: Leaving directory '/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg'
    cp -f prl_tg/Toolgate/Guest/Linux/prl_tg/*.symvers prl_fs/SharedFolders/Guest/Linux/prl_fs ||:
    cd prl_fs/SharedFolders/Guest/Linux/prl_fs && make CC=cc KBUILD_EXTRA_SYMBOLS=/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Module.symvers
    make[1]: Entering directory '/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs'
    make -C /lib/modules/5.10.4-arch2-1/build M=/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs CC=cc
    make[2]: Entering directory '/usr/lib/modules/5.10.4-arch2-1/build'
      CC [M]  /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.o
      CC [M]  /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.o
    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c: In function 'init_buffer_descriptor':
    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:58:31: error: implicit declaration of function 'segment_eq' [-Werror=implicit-function-declaration]
       58 |  bd->user = (user == 0) ? 0 : segment_eq(get_fs(), USER_DS) ? 1 : 0;
          |                               ^~~~~~~~~~
    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:58:42: error: implicit declaration of function 'get_fs'; did you mean 'sget_fc'? [-Werror=implicit-function-declaration]
       58 |  bd->user = (user == 0) ? 0 : segment_eq(get_fs(), USER_DS) ? 1 : 0;
          |                                          ^~~~~~
          |                                          sget_fc
    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:58:52: error: 'USER_DS' undeclared (first use in this function); did you mean 'USER_HZ'?
       58 |  bd->user = (user == 0) ? 0 : segment_eq(get_fs(), USER_DS) ? 1 : 0;
          |                                                    ^~~~~~~
          |                                                    USER_HZ
    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:58:52: note: each undeclared identifier is reported only once for each function it appears in
    cc1: some warnings being treated as errors
    make[3]: *** [scripts/Makefile.build:279: /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.o] Error 1
    make[2]: Leaving directory '/usr/lib/modules/5.10.4-arch2-1/build'
    make[2]: *** [Makefile:1805: /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs] Error 2
    make[1]: Leaving directory '/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs'
    make[1]: *** [Makefile:36: all] Error 2
    make: Leaving directory '/usr/lib/parallels-tools/kmods'
    make: *** [Makefile.kmods:33: compile] Error 2
    Error: could not build kernel modules
    Error during report about failed installation of parallels tools.
    Error: failed to install Parallels Guest Tools!
    2021-01-07T11:55:39+0100: Started installation of Parallels Guest Tools version '16.0.1.48919'
    Error during report about start installation of parallels tools.
    
    Thu Jan 7 11:55:33 CET 2021
    Start installation or upgrade of Guest Tools
    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c: In function 'init_buffer_descriptor':
    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:58:31: error: implicit declaration of function 'segment_eq' [-Werror=implicit-function-declaration]
       58 |  bd->user = (user == 0) ? 0 : segment_eq(get_fs(), USER_DS) ? 1 : 0;
          |                               ^~~~~~~~~~
    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:58:42: error: implicit declaration of function 'get_fs'; did you mean 'sget_fc'? [-Werror=implicit-function-declaration]
       58 |  bd->user = (user == 0) ? 0 : segment_eq(get_fs(), USER_DS) ? 1 : 0;
          |                                          ^~~~~~
          |                                          sget_fc
    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:58:52: error: 'USER_DS' undeclared (first use in this function); did you mean 'USER_HZ'?
       58 |  bd->user = (user == 0) ? 0 : segment_eq(get_fs(), USER_DS) ? 1 : 0;
          |                                                    ^~~~~~~
          |                                                    USER_HZ
    /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c:58:52: note: each undeclared identifier is reported only once for each function it appears in
    cc1: some warnings being treated as errors
    make[3]: *** [scripts/Makefile.build:279: /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.o] Error 1
    make[2]: *** [Makefile:1805: /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs] Error 2
    make[1]: *** [Makefile:36: all] Error 2
    make: *** [Makefile.kmods:33: compile] Error 2
    Error: could not build kernel modules
    Error during report about failed installation of parallels tools.
    Error: failed to install Parallels Guest Tools!
    2021-01-07T11:55:39+0100: execCmd: ./install --install [167]
    2021-01-07T11:55:39+0100: Error: An error occurred when installing Parallels Tools. Please go to /var/log/parallels-tools-install.log for more information.
    2021-01-07T11:55:49+0100: Exiting with code 1
     
  2. SimoneG3

    SimoneG3 Bit poster

    Messages:
    2
    I've the same problem with Manjaro distr and kernel 5.10.2-2. Thnaks
     
  3. Mark Fine

    Mark Fine Pro

    Messages:
    482
    Look at the patch for 5.9
     
  4. SimoneG3

    SimoneG3 Bit poster

    Messages:
    2
    Thanks a lot all is now ok, I've patched manually.
    thanks
     
    MikhailB and Mark Fine like this.
  5. MikhailB

    MikhailB Bit poster

    Messages:
    3
    Indeed it works. Thanks, Mark!
     
    Mark Fine likes this.
  6. MikhailB

    MikhailB Bit poster

    Messages:
    3
    @Mark Fine appears that after successful install, still shared clipboard does not work and there is no mounts either. Checked multiple places, but found no errors anywhere. Could you please suggest how to troubleshoot?
    I am running Arch Linux 5.10.6.
     
  7. Mark Fine

    Mark Fine Pro

    Messages:
    482
    According to post somewhere the clipboard issue might be related to Wayland. I think to get around that don't use the regular Gnome setting when logging in. Try using "Gnome Classic" or "Gnome on Xorg". The shared mounts might be related.
     
  8. DietrichL3

    DietrichL3 Bit poster

    Messages:
    7
    Regarding the patch this made my Fedora 30 (Kernel 5.10) under Mac (Host 10.15.7) working.
    Please note that the parallel tool compilation worked, so I have now shared folders etc., but coherency did not work. Actually, I'm wondering how Parallels can really want their users to follow such advanced machines, but maybe there are to little Linux users which suppoedly are all experts....


    Procedure:
    I used patch (5.9) for my Kernel (5.10) and followed this procudure here (Tools Patch Procedure)

    https://forum.parallels.com/threads/tools-patch-procedure.351669/

    Kernel Patch Downloaded from here:

    https://forum.parallels.com/threads/tools-patch-procedure.351669/

    My modifications were then for the kernel patch in step 9 of the decription:

    a.) Modified Inode.c

    #include <linux/slab.h>

    #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
    #include <linux/blkdev.h>
    #endif

    #include <asm/uaccess.h>

    b.) Modified prl_freeze.c to:

    bd->write = (write == 0) ? 0 : 1;
    #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
    bd->user = (user == 0) ? 0 : uaccess_kernel() ? 0 : 1;
    #else
    bd->user = (user == 0) ? 0 : segment_eq(get_fs(), USER_DS) ? 1 : 0;
    #endif
    bd->flags = TG_REQ_COMMON;



    And this was my patch file I doawnloaded:
    parallels-tools-16.0.0.48916/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
    --- parallels-tools-16.0.0.48916.orig/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c 2020-07-31 03:05:59.000000000 +1000
    +++ parallels-tools-16.0.0.48916/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c 2020-10-18 07:05:09.716999971 +1100
    @@ -55,7 +55,11 @@ void init_buffer_descriptor(struct buffe
    bd->buf = buf;
    bd->len = len;
    bd->write = (write == 0) ? 0 : 1;
    +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
    + bd->user = (user == 0) ? 0 : uaccess_kernel() ? 0 : 1;
    +#else
    bd->user = (user == 0) ? 0 : segment_eq(get_fs(), USER_DS) ? 1 : 0;
    +#endif
    bd->flags = TG_REQ_COMMON;
    }
    diff -puNr parallels-tools-16.0.0.48916.orig/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze.c parallels-tools-16.0.0.48916/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze.c
    --- parallels-tools-16.0.0.48916.orig/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze.c 2020-07-31 03:06:00.000000000 +1000
    +++ parallels-tools-16.0.0.48916/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze.c 2020-10-18 07:13:21.300333278 +1100
    @@ -20,6 +20,9 @@
    #include <linux/workqueue.h>
    #include <linux/namei.h>
    #include <linux/slab.h>
    +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
    +#include <linux/blkdev.h>
    +#endif
    #include <asm/uaccess.h>
    #include "prlfs_freeze_compat.h"

     
    Mark Fine likes this.
  9. Mark Fine

    Mark Fine Pro

    Messages:
    482
    You might have the filenames reversed in a) and b) but it's good that you got it working. Congrats.
     
  10. DietrichL3

    DietrichL3 Bit poster

    Messages:
    7
    Hi Mark,

    you are totally right, in my post the filenames are reversed....

    Regards
    Dietrich
     

Share This Page