Tools Patch Procedure

Since people keep asking...

This post contains detailed, step-by-step instructions to apply any Parallels Tools patch provided in this forum.

NOTE: Please know and understand that this process is not for the meek and expects the user to have a fairly good level of Linux administrative skills. It helps if you know what you're doing and what the implications are by performing each step. By following the instructions below, the reader/user accepts any and all risks, which include the possibility of rendering their version of Linux completely inoperable. By accepting these risks, neither the author of this post nor Parallels can be held responsible for any negative outcome, legally or otherwise.

1. Boot into Linux.
2. Ensure the Tools virtual CD is selected by Parallels by selecting it Devices -> CD/DVD -> prl-tools-lin.iso.
3. Become root user.
> su
> <enter superuser password>
4. Mount the Tools virtual CD in your Linux VM.
# mount /dev/cdrom /mnt
5. Copy the full CD to a local directory, and rename it something like *tools_cd* then enter it.
# cp -R /mnt .
# mv mnt tools_cd
# cd tools_cd
6. Navigate to the source code tarball
# cd kmods
7. Untar the source code.
# tar xvpf prl_mod.tar.gz
Can optionally change ownership:
# chown -R <owner>:<group> ../kmods
8. Move the current tar.gz out of the source tree to protect it in case of an error.
# mv prl_mod.tar.gz ../../
9. Apply the patch to the source code or edit the appropriate files manually.
To apply the patch:
# patch -p1 <patch filename>
Optionally, you can edit the individual files manually (what I prefer to do) using the stated file paths and line numbers in the diff as a guide.
Lines to remove are prefaced with a '-'.
Lines to add are prefaced with a '+'.
10. Re-tar/gzip the source tree.
# tar cvpf prl_mod.tar .
# gzip prl_mod.tar
11. If you are not in the new kernel, reboot into it.
# reboot
12. Once in the new kernel, become root user.
> su
> <superuser password>
13. Change to the directory where you copied the Tools CD.
# cd tools_cd
14. Run the installer and follow all installer directions to perform an *Upgrade* to continue.
# ./install
15. The installer will take a while to complete.
16. If the install is successful it will ask you to reboot. If it failed, it's likely that something in Step 9 was done incorrectly. Simply restart from Step 9, ensuring the changes to each file were made correctly. Worst case scenario, copy the saved copy of prl_mod.tar.gz back into tools_cd/kmods and restart from Step 7.

Note: In the event you upgrade your kernel you may fully rebuild Parallels Tools by simply starting from Step 12. There is something about the scripts that do not fully rebuild/install Tools whenever a kernel is updated via dnf.

Restarting from Step 12 can be done repeatedly until which time that Parallels (and hence, Tools) is ever updated again from Parallels. It assumed that Parallels-provided version of Tools will continue to work for a while. However, eventually it will break, in that case you must restart the entire process and apply a whole new patch once those fixes are determined.
 
Hi everyone, how long normally does a patch work? I got no response for about 10-15 minutes, and I just quit (ctrl-c). I copied via SCP (enabled remote login on my mac). then I did patch -p1. but it seemed to do nothing (not even the echo commands) for 10-15 minutes...
 
If it takes a minute to apply the patch to the code then it's gone on too long. Should be nearly instantaneous.
However, rebuilding Tools with the patched files takes quite a long time though, because it essentially runs it three times - once for each installed kernel.
 
As stated, this is not a process that Dummies should bother with.
If you can't follow nor understand the directions of the first post then I recommend you forget it was ever mentioned.

Dear Mark Fine,
although a Dummie I can minimally follow some instructions as I've already done many times despite not being a computer expert.
In this particular case I did the same with no positive results. Therefore, this is not, at least for me, "detailed, step-by-step instructions".
First of all, when you started posting, what is the system information you are trying to fix?
In my case, I tried to install Parallels tools in Fedora 16 (5.18.8-200.fc36.aarch64) hosted in a MacBook Air (M1 chip, macOS Monterey 12.4) running Parallels Desktop (17.1.4.51567). If your post is not suitable for my system just tell me and I won't waste time on this and try to find a better solution.
Apart from this, I have some doubts because in your post it is not clear to me:
  • Should I use prl-tools-lin.iso or prl-tools-lin-arm.iso? | I've tried it with both.
  • patch -p1 <patch filename> | to "filename" do your refer to prl-tools.patch, which I've found elsewhere?
In any case, as this is a Parallels Forum, I highly encourage and appreciate the Parallels Team to fix this issue.
Best regards.

Disclaimer: English is not my native language. Please keep this in mind if I made any mistakes or misunderstandings.
P.S. I just realized that the post date is too old to refer to my system and found another post initiated by GalaxyMaster (hope I have better luck here)
 
Thanks Mark! That was really helpful. I managed to get it patch successful after multiple trial and error. Realised that the patch file have to be within the folder to work and not outside of the folder. Also need to run patch -p1 < <file> instead of patch -p1 <file>. That for my case. Finally resolved the headache of without "copy and paste"
 
If your post is not suitable for my system just tell me and I won't waste time on this and try to find a better solution.
It's suitable for a 5.18.x kernel and especially for FC36. The instructions were detailed and clear as many others have been able to follow them with little to no issues.

Should I use prl-tools-lin.iso or prl-tools-lin-arm.iso?.
The fact that you have to ask whether to use an ARM- or non-ARM-based iso to rebuild the tools on an ARM-based, M1 chip machine is a massive problem from the start.
 
It's suitable for a 5.18.x kernel and especially for FC36. The instructions were detailed and clear as many others have been able to follow them with little to no issues.


The fact that you have to ask whether to use an ARM- or non-ARM-based iso to rebuild the tools on an ARM-based, M1 chip machine is a massive problem from the start.

Mark, thanks for the instructions. Though clear, it's worth noting that some people are just trying to get a little bit of extra advice and you're taking things way too personally with snidey comments. Everyone has to start somewhere. Relax a little :)
 
Mark, thanks for the instructions. Though clear, it's worth noting that some people are just trying to get a little bit of extra advice and you're taking things way too personally with snidey comments. Everyone has to start somewhere. Relax a little :)
I don't take anything personal, certainly not anything on the internet. I'm just correcting the person who said it wasn't clear enough for them, when it was clear they didn't have the delineated skills.
 
Back
Top