changes to macOS folder does not trigger inotify in Linux guest (parallels shared folder)

CharlB

Bit poster
My use case is this: I have source code on my macOS filesystem, which I edit there using an IDE. That same code is transpiled and executed in a Linux guest, via Parallels Shared Folders (PSF). In the Linux guest, tools like node are using inotify to know when to re-run the compilation.
The problem: Changes on the macOS side are NOT triggering any inotify events in the Linux guest, so the watchers don't know when to recompile.
I can also reproduce this issue using the Linux tool inotifywait. Creating a new file from macOS on the shared folder does not trigger any events.
Interestingly, changes initiated from the Linux host on the macOS hosted PSF *do* trigger inotify events.
 
I just downloaded Parallels 14 and now my Centos 6 and Centos 7 VMs do not propagate local local Mac file changes to the VM. Is there no solution for this? Is Parallels a Windows only VM now?
 
> ... and now my Centos 6 and Centos 7 VMs do not propagate local local Mac file changes to the VM.

Do you mean that file being changed on host is not changed on the guest side? I.e. something like their hashes become different?
 
Yes that is exactly what I mean. An edited file on the host Mac does not propagate to the Linux VM. So when developing and testing in the browser changes are not reflected. If I edit the file directly from the VM it works fine.

I have an open ticket about this and will write up my findings here if it is resolved.
 
To replicate the issue is quite simple. E.g. From the VM open /media/psf/Home/Sites/my-file.php and make edits. The edits are saved and are reflected in the host machine.

Then open the same file on the host machine e.g. /Sites/my-file.php and make edits. The edits are saved, but the changes are NOT made in the VM. This means that when developing, files changed on the host machine are not propagated to the VM unless the VM is re-booted. Not a great development workflow ;-)
 
@RyanO2, it would be great to get a little bit more details from you to reproduce the problem. What applications do you use modify/view files, how do you save changes? For example, my steps which don't reproduce the issue:
0. Create fresh CentOS 7 virtual machine, Parallels Tools for Linux installed.
1. Log in into the guest graphical session.
2. Open a file from Shared Folders (/media/psf/Home/test_dir/test_file.txt) with a default text editor (gedit).
3. Add a line "test" at the edit of this file, press "Save" button and exit gedit.
4. Make sure file is changed on the host:
$ tail -n1 ~/test_dir/test_file.txt
test

5. Edit file on the host side:
$ vim ~/test_dir/test_file.txt
-- add a line "test2" at the end of the file, save and exit from editor :wq vim command).
6. Check the file on host:
$ tail -n2 ~/test_dir/test_file.txt
test
test2

7. Open this file (/media/psf/Home/test_dir/test_file.txt) in the guest once again with gedit and see that there's "test2" at the end.
 
I've tried VSCode on Mac - everything is still ok for me. Need to be sure that is still required to explicitly save file in VSCode (Cmd-S) to make modification go to file system.
 
Some further information. I tried all networking modes on Parallels Desktop 14. None of them worked. I then rolled back to Parallels Desktop 13 and re-installed Parallels Tools. Everything works as it should now. I have included the spec of my Mac below.
 

Attachments

  • Screen Shot 2018-09-20 at 09.20.55.png
    Screen Shot 2018-09-20 at 09.20.55.png
    89.1 KB · Views: 2
I've had the same problem of RynaO2 and the only way to fix the problem has been to rollack to Parallels Desktop 13.
Here a few more info:
  1. create VM with Ubuntu
  2. install apache 2.4
  3. for apache, set root at /media/psf/Home/WebDev/www
  4. create file /media/psf/Home/WebDev/www/index.html
  5. write 'hello world' in index.html from VM;
  6. open index.html with text editor both in VM and Mac. I see all of che changes;
  7. set a new host edit-file.local on Mac and Ubuntu that is handled by apache on VM;
  8. open index.html with chrome under both OS. Up to here everything works perfectly;
  9. edit index.html from Mac with text-editor;
  10. run index.html with chrome under both OS. I cannot see the changes;
  11. open index.html with a text-editor under VM. I can see the changes;
  12. open index.html with a text-editor under Mac. I can see the changes;
  13. run again point 10. I cannot see the changes;
  14. run again point 11 and save (without doing any changes) and run point 10. I can see the changes.
Rollback to Parallel Desktop 13 and everything works perfectly. No matter what I use to edit the file or from where, it just works.
 
Same as Salvatore C3. Only solution is to rollback to Parallels Desktop 13.
Under Parallels 14 running Ubuntu 16.04, Apache serves old version of the files until you reboot the VM o restart Apache.
My config is the same of SalvatoreC3 (php and html are on the Mac and are edited from there), Apache root is set to the (shared) folder (/media/psf/Home.. etc)
I have tried latest build available at today (45387), same issue. Simply rollback to Parallels 13 and all work as aspected.
 
Just chiming in that I am also experiencing this with OSX Host and Ubuntu 18.04 guest. I'm running PHP-FPM and it looks like php-fpm is reading old / corrupt files. Code runs fine when copied directly onto the guests disk. Going to rollback to 13 - have a ticket in play.
 
Guys, Parallels Desktop 14 update has been released. Please update your Parallels Desktop to the latest build (14.1.1-45476) and check the issue.
You can download the update manually here.
Let us know the results.
 
Last edited by a moderator:
I have the same issue and its not gone :-(

Host: macOS 10.14.3
Parallels Desktop: 14.1.2 (45479)
Guest: Ubuntu 18.04.2 LTS

If I change files on the Mac my guest linux doesn't get the changes via inotify ...

That's really bad, because all npm "watch" jobs don't trigger if I change any file via VSCode or other IDE.
 
It seems that inotify still doesn't work with Ubuntu guests :(

Host: macOS 11.0.1 (20B29)
Parallels Desktop: 16.1.1 (49141)
Guest: Ubuntu 20.04.1 LTS

So my setup is that I use Rails 6 and webpack-dev-server for rails development with the source code files in a shared folder.

If I run rails server and webpack-dev-server and edit the files in atom in the shared folder on macOS, no reloads are triggered and even if I refresh the browser manually the changes to the source files are not picked up. However, if I ssh into Ubuntu and use nano to edit the source files in the shared folder, the browser refreshes and the changes to the files are picked up.

rkulikov - should this use case actually work? Do you expect inotify to work within shared folders in Parallels 16 / Ubuntu 20.04?
 
Back
Top