vagrant-parallels
vagrant-parallels copied to clipboard
Issues after upgrading to parallels 14 (Automounting disabled)
Hi All, Since parallels 14 is have some issues with the shared folders, when i change a file i get this error from PHP:
PHP Warning: Unexpected character in input: '
It looks like the endings are converted, but when i downgrade the parallels tools to the version included with parallels 13 it works perfectly.
Does anybody have an idea?
Thanks!
I think it's something that changed in the last few days. Since this error started appearing for me today, while I had this setup with Parallels 14 for longer.
If you install the parallels tools from version 13 (use parallels desktop 14) it works great
Lets give a bit more context here for maintainers:
Parallels Tools: 14.0.45154 Parallels 14 for Mac Pro: Version 14.0.1 (45154)
Default vagrant sync mode
Since I don't have easy access to version 13 tools, I've dug further to find the problem.
The issue, at least in my case, is that I had 'auto-save' turned on in PHP Storm. For whatever reason, syncing is much slower in Parallels 14 and that meant that I kept seeing partially/incorrectly synced files in my vagrant. Turning off auto-save is a temporary workaround for this issue, for me.
In Parallels Tools version 14.0.x we made significant changes and improvements in Shared Folders. Unfortunately they brought some serious issues as well. I expect 14.1.x release be much better.
@TNAJanssen, @gandalfar, can you please provide some narrow test case or steps to reproduce the issue you suffer?
Any ideas on how would one approach that? I guess, I could write a watcher that would inspect shared folder and compare some checksums etc. but this sounds like a lot of work. Do you have any simpler approaches - since it seems (at least to me) that it's a timing/performance thing?
You've mentioned changes in PHP Storm are synced slowly: can you provide:
- code base to test;
- example of changes;
- approximate timing of these changes to sync in Parallels Tools versions 13 and 14.
In other words something for us to try to reproduce the problem.
Steps to reproduce at least on my system:
- Install vvv: ( https://varyingvagrantvagrants.org/docs/en-US/installation/ )
After running vagrant up
first time, you'll need to do vagrant reload
as it crashes due to the #325
2. Visit http://local.wordpress.test/
and confirm the WP site loads. In Chrome, "View Source"
- With phpstorm open:
~/vagrant-local/www/wordpress-default/public_html/wp-content/themes/index.php
On line 30: add a comment:
<?php // example comment here ?>
- Quickly refresh your "View source" tab, you should see a number of:
-- | --
| <b>Warning</b>: Unexpected character in input: ' in <b>/srv/www/wordpress-default/public_html/wp-content/themes/twentyseventeen/index.php</b> on line <b>68</b><br />
on top.
- Wait a few seconds and refresh again. The input errors will now be gone.
Versions:
Vagrant: 2.2.0
VVV: git commit $6661ad660088f0ac64fdc1eb57adeae814154f36
Env variable: VAGRANT_DEFAULT_PROVIDER=parallels
➜ vagrant-local git:(master) vagrant plugin list vagrant-hostsupdater (1.1.1.160, global)
- Version Constraint: > 0 vagrant-parallels (1.7.8, global)
- Version Constraint: > 0 vagrant-share (1.1.9, global)
- Version Constraint: > 0
Parallels desktop 14 Pro for mac: 45154 PHP Storm: 2018.2.5
@gandalfar, thanks a lot! Will try to investigate.
Btw, for anyone looking at this issue, before it's fixed upstream - it seems that changing sync method to NFS, makes sync work better:
config.vm.synced_folder "wp", "/var/wp", type: "nfs"
Same problem for me too. As a short term solution, I switched back to Parallels 13 to solve the problem . Does the latest versions of Parallels (14.1.0.45387) and the vagrant plugin (2.0.0) solve the problem?
This is still an issue in v14.1.0 (45387)
It's very reproducible for me - any change made in the host environment causes 'corruption' of the file in the guest environment, under particular calls.
e.g. a basic file with a simple echo statement invoked via three methods:
php foo.php
php < foo.php
cat foo.php | php
All work fine the first time. After modifying the file on the host, the first two methods produce a syntax error, or if you try to produce highlighted source (php -s
), gibberish followed by a segfault, while cat
accesses the file fine.
I understand that bugs happen, but this has been dragged out for months - I reported an issue about this to Parallels support at the end of August, and after weeks of zero updates, they assured me it would be fixed in the upcoming release, which finally arrived a few days ago... and it's not fixed.
@romankulikov What do you need from us to debug this issue, and fix it? The amount of lost time trying to work around this issue (not to mention trying to explain it to support staff) would pay for 5 years worth of subscription renewals at this point, so please tell me what you need to fix this, finally.
To confirm what was reported before - downgrading to v13 tools does work
For those interested in this route, try the following:
-
Download the v13 installer DMG, and mount (open) it.
-
Copy the file
"/Volumes/Parallels Desktop 13/Parallels Desktop.app/Contents/Resources/Tools/prl-tools-lin.iso"
to somewhere easy to access like your Downloads folder -
Attach the copied
.iso
to your vagrant VM (using the CD/DVD pane/button) -
In a console session inside the guest (e.g. using
vagrant ssh
) run:sudo mount /dev/cdrom /media/cdrom/ sudo /media/cdrom/install
-
Choose "upgrade" (even though it's a downgrade) and let it run.
Confirming my side too. I'm not sure it's a problem of the vagrant plugin. I opened time ago an issue on parallels website and I had got the usual "standard" response. Is anybody of Parallels reading this? :-(
Terribly sorry for so long response!
We investigated the issue and found the reason of the problem. Unfortunately fix was late for 14.1.0 update :-(
Actually issue is not in vagrant plugin but in kernel module for Parallels Shared Folders file system. Bug appeared in 14.0.0, so I confirm downgrade to Parallels Tools version 13.x.x workarounds it. If you don't want to downgrade another possible workaround is flushing page cache in Linux guest:
# echo 1 >/proc/sys/vm/drop_caches
so test scenario is this:
(mac) $ echo 'echo "Hello!"' >foo.php
(linux) $ php foo.php
Hello!
(mac) $ echo 'echo "Hello World!" >foo.php
(linux) $ sudo bash -c 'echo 1 >/proc/sys/vm/drop_caches' # without this issue is reproduced!
(linux) $ php foo.php
Hello World!
Yet another workaround may be disabling mmap in php interpreter but unfortunately I don't know how to do this.
@romankulikov thank you for the quick response. Can you give any ETA for when a fixed version will be available?
You know according to general corporate policies I cannot give any ETA-s publicly.
If none of workarounds suits you well I may try to publish a separate patch to prl_fs source code.
I'm able to run the v13 drivers for myself, that's fine, but I also publish some Vagrant base boxes. I'd rather not do a release and then realise a day later there's an update for v14 drivers.
Thanks again for your efforts on this, it is appreciated.
I've seen the problems reported here during the last days. Glad to see it's not me going crazy, but the problems are real :-)
We're considering switching our team from virtualbox + NFS sharing to Parallels because since the last OS X updates, NFS has become terribly slow. Parallels Shared Folders seemed to be able to beat this performance-wise.
However, these bugs are a real showstopper for serious development. This is nothing the usual Parallels support will be able to address, so glad to have @romankulikov here.
So, one additional thing I'd like to report is that new directories created in OS X seem to be "missing" in the VM: That is, when I create a new directory in OS X in a folder that is shared, a simple ls
in the VM (Linux) will not show this directory. However it is possible to cd
into it. Also rm
works and will remove it on the OS X side as well.
~~@stephenreay Regarding your downgrade instructions – where/how can I download Parallels 13?~~
https://www.parallels.com/products/business/download/
Use the dropbox on top to select a version.
So, one additional thing I'd like to report is that new directories created in OS X seem to be "missing" in the VM: That is, when I create a new directory in OS X in a folder that is shared, a simple ls in the VM (Linux) will not show this directory. However it is possible to cd into it. Also rm works and will remove it on the OS X side as well.
This sounds terrible. Could you please file a separate issue on it with steps to reproduce it?
@romankulikov File here, in this repo? Or a better place to give this visibility at Parallels?
@mpdude, frankly I don't know. On the one side we have a track of issues in Shared Folders here in vagrant-parallels project. On the other side these issues don't relate directly to the plugin, they are bugs in another product.
@legal90, what do you think?
@romankulikov I don't mind it to be here, in this GitHub repo, even if the issue is related to Parallels Desktop, not plugin. Whatever is more convenient for you and other guys from Parallels to track it and communicate with users.
P.s. I personally prefer GitHub rather than forums from the UX perspective (Markdown, mentioning, etc.)
@legal90 and @romankulikov Thanks! I've created #333 as a new issue.
@romankulikov I keep being asked by the Parallels support team to submit technical reports about the underlying issue (which you said was known, and a fix is waiting to be released for) - is there something I can tell them, so they stop asking me to show them details of a bug that is apparently already fixed internally?
@stephenreay , sorry for inconvenience! Our support missed the link on the resolved issue.
Great that i found this conversation. See the same problem, fixed by parallels tools v13 install
The v13 tools install also fixed the issue for me. The problem only started happening after upgrading to Parallels v14 and latest version of vagrant-parallels.
The v13 tools install also fixed the issue for me. The problem only started happening after upgrading to Parallels v14 and latest version of vagrant-parallels.
How to install v13 tool? I have upgraded to Parallels v14.