It took so long to find these smb,nfs,virtualcfs, these synchronization schemes are not perfect under Windows. The perfect or rsync, I use it to synchronize the code on Windows, open the virtual machine in the Windows browser page only 500 milliseconds, compared to the previous 2.3 seconds, almost fly!
There is the MySQL data files do not have to be placed in the Windows host, because access to MySQL only PHP program to access, so, I will be the capacity of the virtual machine to 40G, should not use so much. Usually write code in the Windows host, and then use Rsync to synchronize the Windows code to the virtual machine, note that this is only a single synchronization, only Windows to the virtual machine synchronization. This will be happy to develop!
Key steps to configure rsync:
1. Download Cygwin
2. Installing rsync software with Cygwin
3. Find a Vagrantbox, write a vagrantfile file
Add in 4.vagrantfile:
Vagrant.configure ("2") do |config| Config.vm.synced_folder "C:/work", "/home/wwwroot/default", Type: "Rsync", Rsync__args: ["--verbose", "-- Rsync-path= ' sudo rsync ', '--archive ', '--delete ', '-Z ']end
Other configuration parameters are not changed, specific rsync configuration parameters please refer to the official website: https://www.vagrantup.com/docs/synced-folders/rsync.html
Vagrant Enable Rsync