How do I change the default mount point of a shared folder?

DaPan

Bit poster
How do I change the default mount point for shared files in a linux virtual machine installed by Parallels?
By default, Parallels mounts shared files to /media/psf, how do I change the mount point to a specific location in a linux virtual machine (e.g. ubuntu)? For example, if I want to change the default mount point of a shared folder to /www/wwwroot, what should I do? I know this is detailed in the official documentation for vmware, but it really isn't in the documentation for parallels, the only thing I can find online is to use the ln softlink method to softlink the default mount point to a specific location; how can I use the mount method to change the default mount point to a specific location?
 
This is probably OBE, but I was able to do it with a simple modification to the /usr/bin/prlfsmountd and it DOES persist across reboots but it will surely not persist after a Parallels Tools upgrade or reinstall. Before the details of the mod, I would say that the tool, which is a bash script that gets installed with Parallels Tools for Linux, can be used manually from the command line as follows:
- Unmount all configured PSF shares ...
ricky@bobby-vm~$ prlfsmountd -u
- Mount a specific PSF share, "shake" to the default mount point ...
ricky@bobby-vm~$ prlfsmountd -f --sf shake
- Mount multiple PSF shares to the default mount point ...
ricky@bobby-vm~$ prlfsmountd -f --sf shake --sf bake

To change the default mount point simply edit /usr/bin/prlfsmountd; find the line that defines the env variable, MNT_PT, and change it in accordance with your requirement. Note that the file has 555 permissions so you will need to chmod it to 755 before you can edit it. For example:

$ prlfsmountd -u # unmount the existing shares BEFORE you mod the script otherwise glitches may crop until you reboot
$ cd /usr/bin
$ sudo cp prlfsmountd prlfsmountd.bck
$ sudo chmod 755 prlfsmountd
$ sudo vim prlfsmountd
Now look for a line something like this: [ -d "/media" ] && MNT_PT=/media/psf || MNT_PT=/mnt/psf
In my case I changed it to the following: [ -d "/hyrule" ] && MNT_PT=/hyrule || MNT_PT=/mnt/psf
Save the file and run the tool to remount your shares at the new location ...
$ prlfsmountd -f --sf <your-psf-share>
... and VOILA!
 
Back
Top