Parallels / vagrant-parallels

Vagrant Parallels Provider
https://parallels.github.io/vagrant-parallels
MIT License
996 stars 87 forks source link

Can't copy files form shared folder #361

Closed ph55 closed 4 years ago

ph55 commented 4 years ago

When trying to copy any file from shared folder (/vagrant) on host machine:

cp /vagrant/filename.txt /vagrant/filename_copy.txt 

It fails with message:

cp: skipping file 'filename.txt', as it was replaced while being copied

I guess the reason is that shared folders constantly syncing files to host machine.

ikari7789 commented 4 years ago

I can't copy anything from any shared folder onto anywhere on the guest machine.

$ cp /vagrant/testfile /home/vagrant/testfile
cp: skipping file ‘/vagrant/testfile’, as it was replaced while being copied
mpdude commented 4 years ago

Same here 👋🏻. Seems to be a (breaking) change from Parallels 15 -> Parallels 16; #362 might be a fix.

stephenreay commented 4 years ago

Ugh I've just hit this same issue. @romankulikov are you able to look at the referenced PR for this?

legal90 commented 4 years ago

Hi all,

It's confirmed that this issue exists on all Vagrant VMs with Linux which have Parallels Tools v16 or higher installed. You can find more details in this comment: https://github.com/Parallels/vagrant-parallels/pull/362#issuecomment-695032658

As a workaround, please, ensure that you have Parallels Desktop v16 installed on your and Mac host (prlctl --version) and Parallels Tools v16 in your VM (prltoolsd -V on VM) and then add this line to your Vagrant file to fix it for the default shard folder:

# Vagrant.configure("2") do |config|

  config.vm.synced_folder "./", "/vagrant", mount_options: ["share", "noatime", "host_inodes"]

# end

For custom synced_folder statements - just add host_inodes mount option, making it similar to the example above.

legal90 commented 4 years ago

Hi all, It seems that the issue was fixed in Parallels [Guest] Tools v16.1.49141 (available with Parallels Desktop v16.1.1)

vagrant@ubuntu-18:~$ prltoolsd -V
Parallels Tools: 16.1.49141

Starting since this version, inodes are persistent as it was before v16 release, so there is no need to use host_inodes mount option anymore. But since Parallels Tools are bundled with the base box, it will take some time for box maintainers (like bento, generic or laravel) to rebuild their parallels boxes with latest version of guest tools.

To get it fixed for you right now, please do the following:

  1. Upgrade your Parallels Desktop for Mac to the latest version (16.1.1 or higher): Parallels Desktop top menu -> Check for Updates...
  2. Enable the auto-upgrade of Parallels Tools by adding this to your Vagrantfile (unless you already have it):
    config.vm.provider "parallels" do |prl|
    prl.update_guest_tools = true
    end
  3. Restart your VM, vagrant reload