hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.27k stars 4.43k forks source link

corruption with shared folders on VMWare 6.02 #2533

Closed bdcravens closed 10 years ago

bdcravens commented 10 years ago

This may be a VMWare issue, but it's crazy frustrating either way.

Using VMWare Fusion provider, and the end of files edited in host (via /vagrant folder and shared folders) are getting randomly truncated. Have been able to repeat consistently on multiple Ubuntu 12.04 instances, both existing and new.

Possibly related to this VMWare 6.02 issue: https://communities.vmware.com/thread/462543?start=0&tstart=0

This issue in Sublime Text forum seems to pretty much identify the same issue: http://www.sublimetext.com/forum/viewtopic.php?f=3&t=14705

mitchellh commented 10 years ago

It sounds like this: http://stackoverflow.com/questions/9479117/vagrant-virtualbox-apache2-strange-cache-behaviour

bdcravens commented 10 years ago

I'm pretty sure it isn't that issue. I'm experiencing the issue across multiple VMs, some running Rails (no Apache), others running something like Railo or ColdFusion. The only thing that's the same:

I never had this issue using the VirtualBox provider, and pretty sure that I didn't see it start until VMWare Fusion 6.02 released.

mitchellh commented 10 years ago

I can say that with the paid support customers (many of which have hundreds of employees running Fusion + Vagrant daily) that I haven't heard of this happening. So I'm unsure. :(

bdcravens commented 10 years ago

I think it's a 6.02 issue (please see the links I provided), which is a fairly recent release. To that end, it may right itself with 6.03. Until then, consistently every single file I edit in Sublime Text will randomly drop characters at the end (I can usually fix it by adding a few spaces at the end, but sometimes that's not an option, and I'm forced to use vim on the VM) And to think I purchased the VMWare provider because you said it was more stable :-)

mitchellh commented 10 years ago

I see. Well, luckily for such an annoying but this is the only case I've heard of! I bet as a workaround you can use NFS.

behdadforghani commented 10 years ago

For now, I am using NFS mount instead of hgfs to get around the problem.

helderco commented 10 years ago

Unfortunately, NFS breaks my Salt states because of chown.

drpebcak commented 10 years ago

@helderco does hgfs not care about chowns?

helderco commented 10 years ago

@drpebcak It's NFS that complains. I tried to use it as a workaround until a Vmware 6.03 update.

drpebcak commented 10 years ago

@helderco I had experienced that with nfs, but I had also seen my chef runs failing through hgfs when trying to chown stuff.

You could always use older guest additions (6.0.1 for instance). That's what vmware is currently recommending from what I've seen.

behdadforghani commented 10 years ago

It is not easy. I first had to get my user id on MAC and Linux to be the same. But, most linux flavors put a restriction on the user id and had to fix that as well. Once you have the same user id, then you will be the owner of the files on both machines. I get burnt with every MAC OS and VMWare updates. They fooled me twice, the third time shame will be on me. My next machine will run Centos.

On Wed, Feb 26, 2014 at 2:42 PM, Taylor Price notifications@github.comwrote:

@helderco https://github.com/helderco I had experienced that with nfs, but I had also seen my chef runs failing through hgfs when trying to chown stuff.

You could always use older guest additions (6.0.1 for instance). That's what vmware is currently recommending from what I've seen.

Reply to this email directly or view it on GitHubhttps://github.com/mitchellh/vagrant/issues/2533#issuecomment-36173925 .

helderco commented 10 years ago

@drpebcak I never had problems with chown in hgfs. I did use 6.0.1 for a while and that fixed it when working with Drupal, but then I had to work on a project using composer, I got lots of syntax errors on some sort of truncated cache files. The syntax errors could be fixed by just doing a touch on a file, but they were just too many files.

That's when I reverted to Virtualbox.

ethier commented 10 years ago

This issue is supposedly resolved in Fusion 6.0.3.

helderco commented 10 years ago

I sure hope so!

glenbot commented 10 years ago

This didn't work for me on VMware Fusion 6.0.3. I wrote a post on how to fix this here http://codrspace.com/glenbot/fix-vagrant-vmhgfs-file-corruption-bug-in-vmware-6-0-2-and-6-0-3/

peter-leonov commented 9 years ago

Still having this issue with VMware Fusion 7.1.2 (2779224).