magento2-vagrant-for-developers
magento2-vagrant-for-developers copied to clipboard
Running init_project.sh fails to sync vagrant folders
I'm using virtualbox 5.2.2 and vagrant 2.0.1and the setup fails with:
$ bash init_project.sh
[2018-05-30 23:13:52] Checking requirements [/f/E/Projects/magento2/vagrant-magento/scripts/host/check_requirements.sh]
[2018-05-30 23:13:57] Installing missing vagrant plugins [init_project.sh]
[2018-05-30 23:14:01] Generating random IP address, and host name to prevent collisions (if no custom values specified) [init_project.sh]
[2018-05-30 23:14:04] Installing Magento dependencies via Composer [init_project.sh]
[2018-05-30 23:14:08] Executing composer command [/f/E/Projects/magento2/vagrant-magento/scripts/host/composer.sh]
[2018-05-30 23:14:11] > Checking requirements [/f/E/Projects/magento2/vagrant-magento/scripts/host/check_requirements.sh]
[2018-05-30 23:14:18] > Installing composer [/f/E/Projects/magento2/vagrant-magento/scripts/host/composer.sh]
[2018-05-30 23:14:28] > composer --ignore-platform-reqs --no-interaction install [/f/E/Projects/magento2/vagrant-magento/scripts/host/composer.sh]
[2018-05-30 23:14:32] Initializing vagrant box [init_project.sh]
[2018-05-30 23:15:35] Directory '/f/E/Projects/magento2/vagrant-magento/etc' was not mounted as expected by Vagrant.
Please make sure that 'paliarush/magento2.ubuntu' Vagrant box was downloaded successfully (if not, this may help http://stackoverflow.com/questions/35519389/vagrant-cannot-find-box)
And that Vagrant is able to mount VirtualBox shared folders on your environment (see https://www.vagrantup.com/docs/synced-folders/basic_usage.html ).
Also remove any stale declarations from /etc/exports on the host. [/f/E/Projects/magento2/vagrant-magento/scripts/host/check_mounted_directories.sh]
run bash with admin permission if you using window. Linux make sure you have mount folder contain script have full permissions
Had to add this line to get_host_os.sh:
elif [[ "$(expr substr "${os_name}" 1 6)" == "MSYS_N" ]]; then
echo "Windows"
I tried both these approaches, unfortunately I was unsuccessful. I have Windows 10 x64 Vagrant 2.1.1 VirtualBox 5.2.12 When I access the site in the browser I get an apache folder browser thinger. Says "Index Of".
Do not put the host sync folder in an encrypted home folder.
Try to disable firewall ;-) on Ubuntu:
sudo systemctl disable ufw && sudo systemctl stop ufw
I had this:
==> magento2.vg: Mounting NFS shared folders...
[2018-08-15 16:49:50] The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o vers=3,udp 192.168.10.1:/home/tkhamlai/vagrant-magento/magento2ce /home/tkhamlai/vagrant-magento/magento2ce
Stdout from the command:
Stderr from the command:
mount.nfs: Connection timed out
Disabling the firewall solved the problem.
Same error here on three very different windows machines.
It seems to be some issue with virtualbox itself, since the shared folders are simply not available on the guest machine.
edit
Well, the etc folder is present, but empty:

Actually I just saw that this has already been mentioned here: #173 Gonna try those exact versions now and see..
Well, I used vb.gui=true and files are present now: 
But the same error persists. 🤔
Wait, this is totally plausible to me, since it checks for ${vagrant_dir}/etc/guest/mysql/my.cnf which is in fact missing for me here. Just need to find out why now..
Please kill me .. I figured it all out: Wrong git config I had CRLF which of course doesn't work on Linux.
From requirements:
git config --global core.autocrlf false
git config --global core.eol LF
git config --global diff.renamelimit 5000
In ubuntu 16.04 I've resolved this issue by restoring file permissions of the etc folder and by installing these nfs-common and nfs-kernel-server:
sudo apt-get install nfs-common nfs-kernel-server

-Mac OS Solution - 1.Open mac os settings on privacy 2.Open up the permission(Locker icon) 3.go to "Full Disk Acssess" 4.Add the command line program.(Iterms phpstorm CLI in my case). 5.press "OK" :)
@paliarush i really think its need to be at FAQ. Its takes me a lot of time to find the solution.