I love Vagrant, its a great tool for development. Sadly, once your project gets too big, performance really drops off a cliff on Windows. Running a Symfony2 project, I was getting ~20 second page refresh times. Apparently this relates to VirtualBox NFS on the shared folder.
A few people mentioned using Samba instead of NFS, but I couldn’t find anyone who had successfully used it. I gave it a go, and can confirm, it works a treat.
So first off, ssh into your Vagrant box:
then install Samba and edit the conf file
apt-get install samba
sudo nano /etc/samba/smb.conf
and add in:
comment = Local Dev Server – /var/www
path = /var/www
browsable = yes
guest ok = yes
read only = no
create mask = 0777
force user = root
force group = root
after that restart the Samba server
sudo restart smbd
sudo restart nmbd
Then I copied all the files in my project to my new Samba share directory ( called in this case ‘shared’).
after that I edited my Vagrantfile to make sure the NFS share was definitely turned off.
config.vm.synced_folder “.”, “/vagrant”, disabled: true