Recently upgraded your Mac's operating system to the latest version found a problem, files that are modified by shared folders cannot be synced to the virtual machine immediately, it takes about 30 seconds to sync to the shared folder.
The operating environment is as follows
Virtual machine: Virtualbox
Virtual machine operating system: Ubuntu16.04
Virtual Machine management tools: Vagrant
Physical machine: Mac High Sierra 10.13.4
After modifying a file
It can be found that after the modification through the terminal to view the file discovery directly prompt error and the permissions of the file is not changed to become? (for example)
Every time you modify a file to wait a while to see the effect, very urgent people, not our internet people's pursuit of efficiency practices. Then we'll find a way to solve it. I know it must be the upgrade system caused, but do not know how to solve, googole for a long time, finally found a solution
Set vagrant dir-sync: mount_options = [' actimeo=2 ']. The modifications are completed as follows
Config.vm.synced_folder "/users/vincent/code/", "/home/www",: NFS = True,: mount_options = [' actimeo=2 ']
Why is there such a problem?
This involves some remote knowledge, I do not particularly understand. But the general reason I know, because Mac upgraded to high Sierra after the use of APFS (Apple file system). This can cause synchronization problems.
Then why add actimeo=2 can solve this problem. Specifically, this involves some of the Linux mount knowledge, the personal understanding is not too much, the general meaning is to speed up the Mount directory before the synchronization time. Individual estimates have some performance cost to the system. We'll have the energy later. The meaning of Linux mount command parameter Actimeo in-depth study
Original address: MacOS high Sierra caused VirtualBox Vagrant synchronization slow
Tags: vagrant virtualbox apfs Mount Actimeo mount_options shared directory
- Enable NFS file system to promote Vagrant shared directory performance
- VirtualBox + Ubuntu virtual Machine directory sharing
- Python Virtual Environment virtualenv
- Configure Web site SSL for HTTPS access under Ubuntu nginx
- "Actual combat" Docker Getting Started combat one: Install Dockeer
MacOS high Sierra causes VirtualBox Vagrant to sync slowly