Skip to content

Instantly share code, notes, and snippets.

@mag911
Last active November 15, 2024 12:57
Show Gist options
  • Save mag911/1a5583a766467d6023584d738cee0d98 to your computer and use it in GitHub Desktop.
Save mag911/1a5583a766467d6023584d738cee0d98 to your computer and use it in GitHub Desktop.
Parallel Tools fix for Ubuntu 20.04, 19.04, 19.10, 18.04

Update 25 April 2020:

Many thanks to @KZL1992 @tomslominski @ptrofi @n-thumann for recent comments on their experiences with 20.04 and Parallels 13/14/15, especially the subsitution of the latest prl-tools-lin.iso for older Parallels to get it going.


First off, credit goes to github.com/rudolfratusinski for leading the way here.

https://gist.github.com/rudolfratusinski/a4d9e3caff11a4d9d81d2e84abc9afbf

In a very similar approach, copy the files from the Parallels installation media and drop them in a folder somewhere (eg. ~/parallels_fixed)

Go to the kmods directory (cd ~/parallels_fixed/kmods) and extract the files (tar -xzf prl_mod.tar.gz)

Remove prl_mod.tar.gz file from that directory (rm prl_mod.tar.gz)

Find this file: ~/<your-folder-goes-here>/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/prlfs.h

Modify the file by going to line 16 and inserting a new line. Add this text: #include <uapi/linux/mount.h>

The file should now look like this. Save and exit.

..
#include <linux/fs.h>
#include <uapi/linux/mount.h>
#include <linux/types.h>
..

Go to the kmods directory (cd ~/parallels_fixed/kmods) and re-zip the files: tar -zcvf prl_mod.tar.gz . dkms.conf Makefile.kmods In case you missed it, yes that is a period(.) sitting there by itself and necessary.

Go to the installer directory cd ~/parallels_fixed/installer

Sudo chmod the script files: install-cli.sh (and others) to be executable eg. sudo chmod 777 *.sh

( @7feilee reports that if drag and drop is not working, then also try sudo chmod 777 prl* as the next step after chmod'ing the above script files ).

Then run that file with: sudo ./install-cli.sh -i --verbose

Reboot when it's finished.

@andyrudoff and @katter - many thanks for highlighting the file name correction.

@VirtualL - many thanks for highlighting it works on Ubuntu Mate 19.10 as well.

@Koongcen - many thanks for highlighting it works on Ubuntu 18.04 as well.

@BarryDeng - many thanks for highlighting it works on Ubuntu 20.04 as well.

[email protected] www.bloss.io

@n-thumann
Copy link

Instead of manually patching Parallels Tools, it´s also possible to simply replace your old prl-tools-lin.iso with the one from the most recent one, even if you´re running an older version of Parallels Desktop. For example, I´m running Parallels Desktop 13 with the current Tools ISO from PD 15 and Ubuntu 20.04 is running perfectly fine. You can find a short guide here with several combinations of Kernels, Distributions and Parallels Tools ✌️

@df-a
Copy link

df-a commented Apr 30, 2020

If you get a "Package manager is locked" error, you have to unlock apt.

$ sudo rm -rf /var/lib/dpkg/lock
$ sudo dpkg --configure -a

This seems to allow me to install the default parallels tools package normally afterwards as well, no modding required.

At least in focal fossa, can't say the same for other distros as I haven't investigated it.

@df-a
Copy link

df-a commented Apr 30, 2020

Just FYI, with Parallels Desktop Pro 15.1.3 (47255), the Parallels Tools installed just fine, without any modifications applied, onto the final release build of Ubuntu 20.04.

Me too first time, but upon subsequent installs it wouldn't want to. First time I did a normal install, and subsequent ones were "minimal" though, that may be the clue yet I have no time to investigate this further.

@dh1tw
Copy link

dh1tw commented May 1, 2020

Instead of manually patching Parallels Tools, it´s also possible to simply replace your old prl-tools-lin.iso with the one from the most recent one, even if you´re running an older version of Parallels Desktop. For example, I´m running Parallels Desktop 13 with the current Tools ISO from PD 15 and Ubuntu 20.04 is running perfectly fine. You can find a short guide here with several combinations of Kernels, Distributions and Parallels Tools ✌️

Best and easiest hack I've seen so far. Works great in Parallels Desktop 14 with Ubuntu 20.04 🍾 πŸŽ‰

@gabrieltavaresmelo
Copy link

Instead of manually patching Parallels Tools, it´s also possible to simply replace your old prl-tools-lin.iso with the one from the most recent one, even if you´re running an older version of Parallels Desktop. For example, I´m running Parallels Desktop 13 with the current Tools ISO from PD 15 and Ubuntu 20.04 is running perfectly fine. You can find a short guide here with several combinations of Kernels, Distributions and Parallels Tools ✌️

Best and easiest hack I've seen so far. Works great in Parallels Desktop 14 with Ubuntu 20.04 🍾 πŸŽ‰

This link worked perfectly:
https://n-thumann.de/blog/running-newer-linux-kernels-in-older-parallels-desktop-versions/

@bradennapier
Copy link

I compiled this and many other pieces for Manjaro v20 & Linux 5.6+ into a guide over at the manjaro forums. Thanks for your post as it helped me figure it all out!

https://forum.manjaro.org/t/manjaro-v20-linux-kernel-5-6-w-parallels-tools-guide/140794

@zwithz
Copy link

zwithz commented May 12, 2020

Additionally, I had to modify the following files:
./kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile:20
DRIVER_DIR ?= $(shell pwd)
./kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile.v26:18
$(MAKE) -C $(SRC) M=$(shell pwd) SUBDIRS=$(shell pwd) SRCROOT=$(shell pwd) CC=$(CC) modules

NB: That is for Ubuntu 20.04 "kernel 5.4.0-21" and Parallels: 14.1.3 (45485).

Thanks, It works for me πŸ˜†

@AFObject
Copy link

AFObject commented May 12, 2020

Paralles Desktop 15.1.3 on macOS 15.4, Ubuntu 20.04.
After I run the "sudo ./install-cli.sh -i --verbose" command,
It looks like this:

Get:1 http://security.ubuntu.com/.... [xxx kb]
Get:2 http://security.ubuntu.com/... [xxx kb]
...
Get:28 http://security.ubuntu.com/... [xxx kb]
Fetch 7898kb in 30min9s
Reading Package lists..
return code from apt-get update is 0

And there is no output since this.
Is this right or some errors have occurred?

@AFObject
Copy link

I found a solution which works on my Ubuntu 20.04:
do "sudo apt-get install gcc" and "sudo apt-get install dkms" in terminal.
and then install the Parallels Tools (either install-gui or install.sh) and restart.
Everything is right. you needn't modify anything.

@swchiow
Copy link

swchiow commented May 21, 2020

Additionally, I had to modify the following files:
./kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile:20
DRIVER_DIR ?= $(shell pwd)
./kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile.v26:18
$(MAKE) -C $(SRC) M=$(shell pwd) SUBDIRS=$(shell pwd) SRCROOT=$(shell pwd) CC=$(CC) modules

NB: That is for Ubuntu 20.04 "kernel 5.4.0-21" and Parallels: 14.1.3 (45485).

Works for me. Thanks @KZL1992 !!

@meiyasan
Copy link

meiyasan commented Jun 1, 2020

In case someone gets the crazy idea of updating Ubuntu with the most recent kernel (currently 5.7 while I am writing).
Here are the additional commands to fix issues for kernel > 5.5.
(from the root of the copied directory "~/parallels_fixed" )

FILELIST="./kmods/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prlfs_freeze_compat.h"
FILELIST="./kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_common.h $FILELIST"
FILELIST="./kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/prlfs_compat.h $FILELIST"
FILELIST="./kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c $FILELIST"
FILELIST="./kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c $FILELIST"
FILELIST="./kmods/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze.c $FILELIST"

for FILE in $FILELIST; do
sed "s/file_operations/proc_ops/g" -i $FILE
sed "s/.write/.proc_write/g" -i $FILE
sed "s/.unlocked_ioctl/.proc_ioctl/g" -i $FILE
sed "s/.open/.proc_open/g" -i $FILE
sed "s/.read/.proc_read/g" -i $FILE
sed "s/.release/.proc_release/g" -i $FILE
sed "s/.mmap/.proc_mmap/g" -i $FILE
sed "s/.llseek/.proc_lseek/g" -i $FILE
sed "/.*.owner.THIS.MODULE./Id" -i $FILE
done

sed '25iKBUILD_EXTRA_SYMBOLS := $(DRIVER_DIR)/../../../../../prl_tg/Toolgate/Guest/Linux/prl_tg/Module.symvers' -i ./kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/Makefile

NB: The main issue is due to a change in a structure of the kernel "file_operations --> proc_ops"
(commit:3dfa92633af3; git diff -w 9ef20389622d 30745068fb39)

Cheers

@CarlBye
Copy link

CarlBye commented Nov 16, 2020

Additionally, I had to modify the following files:
./kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile:20
DRIVER_DIR ?= $(shell pwd)
./kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile.v26:18
$(MAKE) -C $(SRC) M=$(shell pwd) SUBDIRS=$(shell pwd) SRCROOT=$(shell pwd) CC=$(CC) modules

NB: That is for Ubuntu 20.04 "kernel 5.4.0-21" and Parallels: 14.1.3 (45485).

thx, it works!!!

@johnZYW
Copy link

johnZYW commented Dec 2, 2020

Wonder if anyone has the same error message as i after run sudo ./install-cli.sh -i --verbose

[
Screenshot from 2020-12-02 16-20-14

@mag911
Copy link
Author

mag911 commented Dec 2, 2020

Wonder if anyone has the same error message as i after run sudo ./install-cli.sh -i --verbose

[
Screenshot from 2020-12-02 16-20-14

What Ubuntu version are you trying to put Parallels 14.0.1.45154 client tools on?

@johnZYW
Copy link

johnZYW commented Dec 2, 2020

Wonder if anyone has the same error message as i after run sudo ./install-cli.sh -i --verbose
[
Screenshot from 2020-12-02 16-20-14

What Ubuntu version are you trying to put Parallels 14.0.1.45154 client tools on?

ubuntu 20.04

@mag911
Copy link
Author

mag911 commented Dec 2, 2020

What Ubuntu version are you trying to put Parallels 14.0.1.45154 client tools on?

ubuntu 20.04
And you didn't miss any steps in the instructions? Maybe delete the folder and start clean?

@johnZYW
Copy link

johnZYW commented Dec 2, 2020

What Ubuntu version are you trying to put Parallels 14.0.1.45154 client tools on?

ubuntu 20.04
And you didn't miss any steps in the instructions? Maybe delete the folder and start clean?

yes, i have tried multiple times and all gave the same error. I actually found an instruction that did solve the error https://forum.parallels.com/threads/parallels-vm-tools-on-gentoo-vm-gcc-install-error.346287/. But an new error comes out.

try2

@johnZYW
Copy link

johnZYW commented Dec 2, 2020

What Ubuntu version are you trying to put Parallels 14.0.1.45154 client tools on?

ubuntu 20.04
And you didn't miss any steps in the instructions? Maybe delete the folder and start clean?

yes, i have tried multiple times and all gave the same error. I actually found an instruction that did solve the error https://forum.parallels.com/threads/parallels-vm-tools-on-gentoo-vm-gcc-install-error.346287/. But an new error comes out.

try2

I made extra modification following @swchiow and now it worked !

Additionally, I had to modify the following files:
./kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile:20
DRIVER_DIR ?= $(shell pwd)
./kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile.v26:18
$(MAKE) -C $(SRC) M=$(shell pwd) SUBDIRS=$(shell pwd) SRCROOT=$(shell pwd) CC=$(CC) modules

NB: That is for Ubuntu 20.04 "kernel 5.4.0-21" and Parallels: 14.1.3 (45485).

@miketaaa
Copy link

hey! I have a new approach,Just load the prl-tools-lin.iso of parallels desktop to ubuntu can worked !
Here is the download link => Google Driver
QQ20201216-230059@2x
QQ20201216-225835
E96276FA656E0D403CED863FAEADAC00

@OptimusGREEN
Copy link

This post above worked a treat, thanks.!

@holiday-sunrise
Copy link

holiday-sunrise commented May 21, 2021

I got the following error:

`Error:

Started installation of Parallels Guest Tools version '15.1.4.47270'
Error during report about start installation of parallels tools.

Fri May 21 13:14:50 CEST 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 (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.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.8.0-53-generic/build M=/usr/lib/parallels-tools/kmods/prl_eth/pvmnet CC=cc
make[2]: Entering directory '/usr/src/linux-headers-5.8.0-53-generic'
AR /usr/lib/parallels-tools/kmods/prl_eth/pvmnet/built-in.a
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/src/linux-headers-5.8.0-53-generic'
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.8.0-53-generic/build
2: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg
3: 20210521
4: 1.7.0
Start compile prl_tg...
make -C /lib/modules/5.8.0-53-generic/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/src/linux-headers-5.8.0-53-generic'
1: /lib/modules/5.8.0-53-generic/build
2: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg
3: 20210521
4: 1.7.0
CC [M] /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.o
/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c: In function 'prltg_proc_create_data':
/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:405:46: error: passing argument 4 of 'proc_create_data' from incompatible pointer type [-Werror=incompatible-pointer-types]
405 | return proc_create_data(name, mode, parent, fops, data);
| ^~~~
| |
| struct file_operations *
In file included from /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:10:
./include/linux/proc_fs.h:103:31: note: expected 'const struct proc_ops *' but argument is of type 'struct file_operations *'
103 | extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:286: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.o] Error 1
make[2]: *** [Makefile:1777: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-5.8.0-53-generic'
make[1]: *** [Makefile:42: prl_tg] Error 2
make[1]: Leaving directory '/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg'
make: *** [Makefile.kmods:31: compile] Error 2
make: Leaving directory '/usr/lib/parallels-tools/kmods'
Error: could not build kernel modules
Error during report about failed installation of parallels tools.
Error: failed to install Parallels Guest Tools!

`

What can i do.

@varette
Copy link

varette commented Jul 27, 2021

The Parallels Guest Tools from version 15 aren't compatible with linux 5.6 and above. I wrote a quick and dirty patch to update the kernel modules. The instructions are mostly the same as above. Use at your own risk, I am not an experienced kernel developer and mistakes in kernel modules could potentially corrupt data inside the VM. (you'll know if something's wrong when ubuntu pops a dialog about an "internal error")

Here are summarized instructions for the preparatory steps, there are more details above:

  1. Download Parallels Desktop 15
  2. Inside the dmg file, find prl-tools-lin.iso (inside of the .app directory) and move it out
  3. Connect the ISO image in your linux VM
  4. Inside the VM, copy the entire content of the guest tools disk into a directory in your home directory
  5. In the directory you have copied, find prl_mod.tar.gz in the kmods directory, extract it.
  6. If not already done, open a terminal shell in the directory into which you have extracted prl_mod.tar.gz

We're now ready to apply the patch. Here the instructions diverge from those above:

  1. Download the patch. Save it in the same directory where you extracted the tar archive
  2. Apply the patch from the command line by running patch -p1 < parallels-15-guest-tools-patch-for-linux-5-6.patch
  3. You can now re-compress the files back into the tar archive
  4. And now run the installer

I have tested it on ubuntu 20.04 (focal) and the modules load without error. The graphic drivers work. Clipboard sharing might not be working, and I haven't tested folder sharing.

@Yensan
Copy link

Yensan commented Jun 18, 2022

I use paralels desktop 14.0.1 (45154), Arch/Alpine/openSUSE...(they are all 5.15.x), then, failed. Parallels installer can't find path of linux-headers.
parallels sucks in Linux. I must say it is annoying.
I give it up.
Although higher version have more function, but old version save RAM, this is why I use parallels 14.

@cgnl
Copy link

cgnl commented May 9, 2024

I just wanted to comment how to get Parallels tools working in Parallels 18.1.1 because it was very annoying that it didn't install in my Kali Linux guest VM.

I tried the tutorial mentioned earlier, but it directs to what is now a small web installer of the Parallels Trial, that does NOT include Parallels Tools in the DMG.

How to get copying and pasting to work in a Kali guest VM using version of Parallels 18.1.1:

  • Download the latest offline installer of Parallels 19.3 with this URL: https://download.parallels.com/desktop/v19/19.3.1-54941/ParallelsDesktop-19.3.1-54941.dmg?experience=enter_key
  • Mount the DMG and extract the latest Parallels Tools ISO from /Volumes/Parallels Desktop 19/Parallels Desktop.app/Contents/Resources/Tools
  • Overwrite the Parallels Tools ISO in your installed package in /Applications/Parallels Desktop.app/Contents/Resources/Tools/
  • Install Parallels Tools succesfully in the guest VM.
  • (Optional) Disable automatic updates of Parallels Tools in the config.pvs of your VM

@thomasbergersen
Copy link

thomasbergersen commented May 24, 2024

I just wanted to comment how to get Parallels tools working in Parallels 18.1.1 because it was very annoying that it didn't install in my Kali Linux guest VM.

I tried the tutorial mentioned earlier, but it directs to what is now a small web installer of the Parallels Trial, that does NOT include Parallels Tools in the DMG.

How to get copying and pasting to work in a Kali guest VM using version of Parallels 18.1.1:

  • Download the latest offline installer of Parallels 19.3 with this URL: https://download.parallels.com/desktop/v19/19.3.1-54941/ParallelsDesktop-19.3.1-54941.dmg?experience=enter_key
  • Mount the DMG and extract the latest Parallels Tools ISO from /Volumes/Parallels Desktop 19/Parallels Desktop.app/Contents/Resources/Tools
  • Overwrite the Parallels Tools ISO in your installed package in /Applications/Parallels Desktop.app/Contents/Resources/Tools/
  • Install Parallels Tools succesfully in the guest VM.
  • (Optional) Disable automatic updates of Parallels Tools in the config.pvs of your VM

πŸ‘πŸ‘πŸ‘πŸ‘πŸ‘πŸ‘ Thank you! @cgnl

@thomasbergersen
Copy link

image

@ww-91
Copy link

ww-91 commented Jul 1, 2024

I just wanted to comment how to get Parallels tools working in Parallels 18.1.1 because it was very annoying that it didn't install in my Kali Linux guest VM.
I tried the tutorial mentioned earlier, but it directs to what is now a small web installer of the Parallels Trial, that does NOT include Parallels Tools in the DMG.
How to get copying and pasting to work in a Kali guest VM using version of Parallels 18.1.1:

  • Download the latest offline installer of Parallels 19.3 with this URL: https://download.parallels.com/desktop/v19/19.3.1-54941/ParallelsDesktop-19.3.1-54941.dmg?experience=enter_key
  • Mount the DMG and extract the latest Parallels Tools ISO from /Volumes/Parallels Desktop 19/Parallels Desktop.app/Contents/Resources/Tools
  • Overwrite the Parallels Tools ISO in your installed package in /Applications/Parallels Desktop.app/Contents/Resources/Tools/
  • Install Parallels Tools succesfully in the guest VM.
  • (Optional) Disable automatic updates of Parallels Tools in the config.pvs of your VM

πŸ‘πŸ‘πŸ‘πŸ‘πŸ‘πŸ‘ Thank you! @cgnl

Thank you so much - this was the only thing that actually worked for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment