Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launch Vagrant on the Windows 10 #173

Closed
MaxMage opened this issue Feb 28, 2018 · 5 comments
Closed

Launch Vagrant on the Windows 10 #173

MaxMage opened this issue Feb 28, 2018 · 5 comments

Comments

@MaxMage
Copy link

MaxMage commented Feb 28, 2018

Sorry that not post the issue, maybe to someone will be helpful. I tried to launch this Vagrant on the Windows 10 during 3 - 5 days, Faced with such issues:

  1. the first was with Vagrant, the current versions of Vagrant 2.0.2 don't work properly on Windows 10. the issue SocketError: Failed to open TCP connection to rubygems.org:443 During plugin instillation hashicorp/vagrant#9516, doesn't relate to the current Vagrant container, but it was. And maybe it was the reason why i tried the versions 1.x. After that, i decided to try another version of Vagrant, like 1.9.x and 1.8.x all these versions lead me to the issue number 2

  2. The second was with mounting my.cnf, it was solved by setup "correct" version of Vagrant (2.0.1) and Vbox (5.2.6), but was issue number 3

Initializing vagrant box [init_project.sh]
[2018-02-28 22:24:31] Directory '/n/magento/vm22/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 ) [/n/magento/vm22/vagrant-magento/scripts/host/check_mounted_directories.sh]

  1. On this step, i faced with issue below, the Vagrant container with Ubuntu didn't contain Magento codebase, was only created directory var, generated app/etc

[2018-02-28 20:35:43] Checking if all required directories were mounted successfully [/vagrant/scripts/guest/check_mounted_directories]
[2018-02-28 20:35:43] > Directory '/var/www/magento2ce' was not mounted as expected and Magento code base is not accessible on the guest machine.
If your host is OSX or *nix, please make sure that Vagrant is able to mount NFS shares on your environment (see #88 (comment) ) [/vagrant/scripts/guest/check_mounted_directories]

the solution for this was updated the directive to such

        guest_magento_dir = '/var/www/magento2ce'
        config.vm.synced_folder host_magento_dir, guest_magento_dir
        config.vm.synced_folder host_magento_dir + '/var', guest_magento_dir + '/var', create: true
        config.vm.synced_folder host_magento_dir + '/generated', guest_magento_dir + '/generated', create: true
        config.vm.synced_folder host_magento_dir + '/app/etc', guest_magento_dir + '/app/etc', create: true

so i added synchronization with Magento codebase from a host machine to the guest, maybe not the best solution, but at the current moment, this works for me.

config.vm.synced_folder host_magento_dir, guest_magento_dir

at the current moment Magento works, i didn't test it well, so can't say what kind of issues can popup with Magento and Vagrant.

@vy-shmal
Copy link

Thank you @MaxMage for your solution, I had the same error and spent 2 hours finding a solution for it.
Your answer solved my solution, I had to destroy the box and re run the bash script.

@jeroencusters
Copy link

Thanks @MaxMage ! Same issue here.
@vy-shmal You don't have to destroy the box. Stop the box and execute 'vagrant up' updates the box config (shared magento root folder)

@paliarush
Copy link
Owner

@MaxMage thanks for sharing this info. Added it to the FAQ section of the readme.

@esteban-filardi
Copy link

What is the reason this line

config.vm.synced_folder host_magento_dir, guest_magento_dir

isn't written in the Vagrantfile by default when NFS is disabled (or using Windows)?

@paliarush
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants