vagrant-parallels icon indicating copy to clipboard operation
vagrant-parallels copied to clipboard

Issues after upgrading to parallels 14 (Automounting disabled)

Open TNAJanssen opened this issue 5 years ago • 50 comments

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!

TNAJanssen avatar Oct 22 '18 08:10 TNAJanssen

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.

jurecuhalev avatar Oct 22 '18 13:10 jurecuhalev

If you install the parallels tools from version 13 (use parallels desktop 14) it works great

TNAJanssen avatar Oct 22 '18 13:10 TNAJanssen

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

jurecuhalev avatar Oct 22 '18 15:10 jurecuhalev

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.

jurecuhalev avatar Oct 23 '18 09:10 jurecuhalev

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?

romankulikov avatar Oct 23 '18 10:10 romankulikov

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?

jurecuhalev avatar Oct 23 '18 10:10 jurecuhalev

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.

romankulikov avatar Oct 23 '18 12:10 romankulikov

Steps to reproduce at least on my system:

  1. 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"

  1. 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 ?>

  1. 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.

  1. 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

jurecuhalev avatar Oct 25 '18 11:10 jurecuhalev

@gandalfar, thanks a lot! Will try to investigate.

romankulikov avatar Oct 25 '18 21:10 romankulikov

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"

jurecuhalev avatar Nov 01 '18 16:11 jurecuhalev

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?

rtshome avatar Nov 27 '18 06:11 rtshome

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.

stephenreay avatar Nov 27 '18 21:11 stephenreay

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.

stephenreay avatar Nov 27 '18 22:11 stephenreay

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? :-(

rtshome avatar Nov 27 '18 22:11 rtshome

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 avatar Nov 28 '18 10:11 romankulikov

@romankulikov thank you for the quick response. Can you give any ETA for when a fixed version will be available?

stephenreay avatar Nov 28 '18 11:11 stephenreay

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.

romankulikov avatar Nov 28 '18 11:11 romankulikov

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.

stephenreay avatar Nov 28 '18 12:11 stephenreay

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.

mpdude avatar Nov 29 '18 14:11 mpdude

~~@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.

mpdude avatar Nov 29 '18 15:11 mpdude

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 avatar Nov 29 '18 15:11 romankulikov

@romankulikov File here, in this repo? Or a better place to give this visibility at Parallels?

mpdude avatar Nov 29 '18 15:11 mpdude

@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 avatar Nov 29 '18 17:11 romankulikov

@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 avatar Nov 29 '18 19:11 legal90

@legal90 and @romankulikov Thanks! I've created #333 as a new issue.

mpdude avatar Nov 29 '18 20:11 mpdude

@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 avatar Dec 06 '18 09:12 stephenreay

@stephenreay , sorry for inconvenience! Our support missed the link on the resolved issue.

romankulikov avatar Dec 06 '18 16:12 romankulikov

Great that i found this conversation. See the same problem, fixed by parallels tools v13 install

timurkar avatar Dec 14 '18 08:12 timurkar

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.

ashgibson avatar Dec 19 '18 03:12 ashgibson

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.

fenbox avatar Jan 16 '19 14:01 fenbox