hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.

Home Page:https://www.vagrantup.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shared folder file timestamps not updating

jch opened this issue · comments

I'm not sure if this is a Vagrant issue or a VirtualBox issue, but I thought I'd ask here first.

I'm running Vagrant on OSX Lion with the base lucid32 box. When I try to run guard within the VM, it works fine if I touch the files from within the VM. However, touching the files in OSX doesn't trigger any of the guards even though the file changes are successfully synced over. Any ideas?

I don't have any ideas, but definitely not a Vagrant issue itself, unless there is a setting I'm forgetting to set.

There has always been oddities with guard and virtualbox shared folders so I'm not sure :( I'd try pinging the [vagrant] mailing list to see if anyone else has seen this.

If you find any more evidence to think this is a Vagrant issue, please let me know and I'll reopen.

I'm also having this issue. @jch have you figured out how to get around this?

@axsuul There's been an update on this issue when Windows is the host OS, but I just tried updating to the latest version of vbox (4.1.10-76795-OSX) with ubuntu as the guest OS and it's still not working for me. I haven't dug any further into it since I last looked at it.

@jch Ah cool, thanks, that looks like the exact issue I'm having (Windows as the host OS here). Looks like I'll have to wait for the next maintenance release to see if it works.

Alright, I've updated to the latest 4.1.12 which is suppose to include this fix. I've tried using guard with polling but it still doesn't pick up the file changes. Doh!

Since VirtualBox doesn't support symlinks from Windows host shared folder to Linux, it makes it useless for Node.js projects (npm requires symlinks). My solution was to watch for file changes using inotifywait and run rsync to another folder where the node modules are installed. Unfortunately, inotifywait doesn't see any changes when I make them from windows. Any other ideas on this one, guys?

UPDATE: I just saw the ticket on virtual box and it says I need to update guest additions as well, which I did not. Did you guys update your guest editions?

UPDATE: I updated guest additions and no luck. Same issue...

I'm having the same issue on OS X with Vagrant 1.0.2 and VirtualBox 4.1.14. I'm also using guest additions.

@clintberry which ticket were you referring to regarding needing to update guest additions as well?

Anyone have an oracle login so this bug can be submitted? I don't think that ticket I link to above is the same issue.

Finally got this issue resolved by updating to Guest Additions 4.1.18 and using polling guard -p

Axsuul - That is awesome. How do I use guard -p with vagrant?

I'm using an Ubuntu 12.04 box I packaged with the updated Guest Additions (you can grab it @ http://public.g0dly.com/boxes/precise64-4.1.18.box). You just run vagrant on the guest OS with guard -p and any changes that are made on the host OS (Windows, for my case) will trigger guard to run tests :) Unfortunately, it's not instantaneous and sometimes can take a second =/

Let me know if you have any more questions

Oh I see. I thought guard was a special flag you were sending to vagrant. But now I see you are saying this issue is fixed with the updated guest additions, which is great. I will update right away. Thank you very much for letting us know!

Thanks for the update, definitely going to try this out ASAP.

Well I'm running Arch Linux Virtual Box guest in a Windows 8 host. I have:

virtualbox-guest-modules 4.2.10-2 
virtualbox-guest-utils 4.2.10-2   

installed but I still don't get the OS updates on file changes from my shared (samba) drives. My shared drive has symlinks enabled via the setextradata virtualbox option.

Am I missing something out? Also @clintberry virtualbox supports symlinks but it's tricky:
See: