The 'host_compress_magento_code' provisioner could not be found - vagrant

So I'm trying to install a second vagrant VM, specifically configured for Magento 2. Which I found here: https://github.com/paliarush/magento2-vagrant-for-developers
on windows 10.
I couldn't clone the repository, because I got "Access denied", so instead I just downloaded the rar and extracted it into a folder.
Afterwards I launched my GitBash and did "vagrant up" into the folder.
After about an hour of downloading I get this error:
"There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* The 'host_compress_magento_code' provisioner could not be found."
Additionally it had a problem with hosts manager as well, but I quickly found out I can do "vagrant plugin install vagrant-hostmanager" and it solved that error, but the missing "host_compress_magento_code" continues to not let me up the vagrant.
In "Vagrantfile" I found the following line:
config.vm.provision "host_compress_magento_code", type: "host_shell", inline: "tar -cf scripts/host/magento2ce.tar magento2ce"
Quick search about the command lead me to believe that it needs "magento2ce" file in the vagrant root dir in order to create that "magento2ce.tar" archive.
But I have no clue what that file should be.
Can anyone point me in the right direction? Google searches just lead to threads where "vagrant plugin install vagrant-hostmanager" has been the solution.
Thanks in advance!

After cloning of Vagrant Box for Magento 2 Developers you should (simplified version):
Copy etc/composer/auth.json.dist to etc/composer/auth.json.
Add the Magento Marketplace keys for Marketplace authorization to the repo.magento.com section.
Run init_project.sh
Please, read more carefully Installation steps section. It contains more details of how you can configure and work with this vagrant box.
init_project.sh install all needed vagrant plugins and after that run vagrant up. After you init of project you can work as ordinary vagrant suspend, vagrant resume and etc

Related

Vagrant dev build throwing errors

So I am having some issues with vagrant. I had initially tried to report this as an issue on the vagrant github issue boards, but they kept closing the issues without responding to them. I guess they decided I wasn't worth their time, or they were just behaving unprofessionally. Anyway, Here is the problem: I use vagrant with virtualbox, and a new version of virtualbox was recently released that is, unfortunately, not compatible with the latest vagrant installation.
However, the people at hashicorp have already updated the source code so that it is compatible with the new version of virtualbox, but you have to build the vagrant executable from the source repo (instructions here). So I followed the instructions and vagrant is working just like it used to.....when the only command I need to run is vagrant up. I should also mention ahead of time that, in order to run the vagrant dev build, the current working directory needs to be the root of the source code repo and the dev build can only be run using the following command with ruby:
bundle exec vagrant
With that being said, I needed to update one of my custom boxes, so I built a vm in the updated version of virtualbox and ran the below command
bundle exec vagrant package --base go --vagrantfile ../../vagrant/vagrantfile
After an extended period of time, vagrant spat back out the following error
The executable 'bsdtar' Vagrant is trying to run was not found in the %PATH% variable. This is an `error. Please verify this software is installed and on the path.`
I should also note that I use a windows machine and that this error never occurred when using the installed version of vagrant. At this point, I had posted the issue on github to get some input from the devs, but they (very unprofessionally) decided to ignore my requests for help and close the issues without providing any response. I used the GNUwin32 project to make numerous unix commands available to my Windows environment and added the folder to my PATH environment variable. I then run the same command again to create my new box and it works!! So then I upload it to the vagrant cloud and attempt to update the vagrant box that is stored on my system by running the following command:
bundle exec vagrant box update
Then, after waiting for a while, vagrant then spat this error out at me:
The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and that enough disk space
is available and then try again.
The output from attempting to unpackage (if any):
C:\gnuwin32\bin/bsdtar.EXE: invalid option -- s
Usage:
List: bsdtar.EXE -tf <archive-filename>
Extract: bsdtar.EXE -xf <archive-filename>
Create: bsdtar.EXE -cf <archive-filename> [filenames...]
Help: bsdtar.EXE --help
Another error, and still involving this bsdtar tool. It does not appear that anyone else is reporting the issue I am running into because I think they are just waiting for hashicorp to release the new official installation, but, just to give you a look into their priorities, the version of virtualbox that was released which no longer worked with vagrant was released back on December 10. It has been over a month since and there is still no updated release.
So, I am hoping that someone out there might be able to find out why I keep running into these errors when trying to use vagrant's dev build and provide a solution. If not, then maybe if someone else is able to reproduce the issue and report it to hashicorp, maybe they will listen to someone else.
If you are on Ubuntu 20.04 then bsdtar was removed. Try to install libarchive-tools package.
$ sudo apt-get install libarchive-tools
I figured it out. My original hypothesis was correct: since vagrant is a tool that was built primarily to be run on linux machines, then vagrant runs in windows, the installation includes a mingw environment with all of the dependencies vagrant needs to function and which the installed vagrant executable imports into the console session when run. This why the dev build kept failing: because it was not importing this mingw environment. So, in order to fix the issue, I first cloned the vagrant source code repo from github and followed the instructions I linked to above to build the executable from the source repo. I then copied all of the files in the source repo into the following folder:
<hashicorp install folder root>\Vagrant\embedded\gems\2.2.6\gems\vagrant-<version num>
So, for me, the destination directory is C:\HashiCorp\Vagrant\embedded\gems\2.2.6\gems\vagrant-2.2.6
This directory is identical to the source code repo, and copying the source code repo to the above folder replaces the installation version of vagrant with the dev build. After I did this, running the vagrant commands which had failed previously normally (as in, without using ruby or bundle) worked. I hope this helps someone else out there who Hashicorp has decided is not worth their time.

Vagrant - Bash: Command not found

Looking for some assistance with Vagrant, for what I believe is a Server Variable issue.
I have been trying all weekend to get any kind of Vagrant install up and running. I have followed:
Laravel Homestead installation guide, and
Sitepoint Homestead Vagrant VM guide.
I am using the default folders for install. Whatever I do, after installing Vagrant, I am unable to run 'vagrant up' or vagrant init' because the command 'vagrant' cannot be found (bash: vagrant: command not found). I am trying to execute from the folder with Vagrantfile in it, as suggested by Sitepoint.
I found this Stack Overflow article: Vagrant Command Stopped Working: Command not Found on Windows, but with the current version doesn't work as that bin folder is empty (note that the 'embedded' folder beside it is full, with several 'bin' folders down within the subfolder structure).
I am not familiar enough with Vagrant to know to which folder I should set the server variable, if indeed that is the right answer. It has to be simple, as no sites address this particular issue anywhere. Any assistance will be greatly appreciated.
Win 7, Vagrant 2.1.2, Virtualbox 5.2.14
At the time of writing, Vagrant v2.1.2 is missing vagrant.exe in the i686.msi file.
There are two parts to this answer.
In GitBash, run commands with .\ preceeding the filename(ie .\vagrant up). See earlier comments for the credit for this answer.
Missing executable has been raised as an issue on Github. Without the executable, it, of course, was throwing a command not found error. https://github.com/hashicorp/vagrant/issues/10026?_pjax=%23js-repo-pjax-container
Thanks for your support Rohit.

'vagrant ssh' not working with the vagrant-multi-putty plugin

I am trying to run VirtualBox with Vagrant and the plugin vagrant-multi-putty. I am running Windows 10 and am following this guide. All the plugins and steps seem to work fine until I get to the “vagrant ssh” step. I get this error:
I did some googling and the recommended solution is usually to set the path correctly to putty.exe. You can do that like so:
set PATH=%PATH%;C:\Program Files (x86)\PuTTY
Even though the plugin seems to be installing right I can’t find the putty.exe file anywhere on my system. I tried downloading the binaries from here and manually adding them to C:\Program Files (x86)\PuTTY. Then I set the path like the example above. However, I am still getting the same error when I run "vagrant ssh".
Made the same misstake myself at first.
According to the installation instructions for https://github.com/nickryand/vagrant-multi-putty you are supposed to use:
vagrant putty
instead of "vagrant ssh"

unable to install laravel homestead using command line

i am trying to install laravel homestead in my windows 7 pc but every time fails it starts downloading but after some percentage it stops and display errors like
"SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054"
i have restarted download but every time after some percentage it stops i am tired now please help me
i have installed "vagrant_1.7.4.msi" and "VirtualBox-4.3.30-101610-Win.exe" also
I'm also unable to install it online in Windows 7, it will always stop downloading at some point before 15%.
What I had to do was to download the .box file and add it locally.
You can download the file from:
https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.2.7/providers/virtualbox.box
For convenience rename it to something like homestead-0-2-7-vb.box and do the following:
vagrant box add laravel/homestead file:///c:/homestead-0-2-7-vb.box
Try
vagrant box add --insecure -c laravel/homestead http://atlas.hashicorp.com/laravel/boxes/homestead
It worked for me.
Got it from here
If you can't finish even the manual download, try to download from this mirror. This is a copy of laravel/homestead 0.5.0. Use this command to add:
vagrant box add laravel/homestead "path-to-your-file"
I also had the same error "errno 10054".
However, in my environment I solved it with the following contents.
Windows10 64bit
Git bash 2.21.0
Virtual Box 6.0.4
vagrant 2.2.4
As a result, this was necessary for me.
MSVCR100.DLL
https://www.microsoft.com/en-us/download/details.aspx?id=14632
In my case, the installation was successful if I do it as follows.
To install "MSVCR100.DLL" on windows
To command "Vagrant box add laravel/homestead" at terminal.

mlstate/opa vagrant box installation issue

I stumble upon the OPA framework for Javascript and decided to give it a shot.
Prefering a Vagrant Box, I did as suggested:
vagrant init mlstate/opa
vagrant up
but unfortunately it failed: Allegedly the box file is corrupted as bsdtar.exe couldn't even recognize the format while unpacking it.
What can I do, I need an official OPA Vagrant Box up and running on my Win7 machine to harness it.
I have the same problem on my Mac laptop. Installing the Vagrant Box from Vagrant Cloud does not seem to be working...
In alternative, you can try downloading the box file using the torrent on this link : http://opalang.org/Opa%20vagrant%20box.torrent
Once the box file is downloaded, issue the following commands :
vagrant box add opa-box file:///your_path_to_downloaded_file/opa.box
vagrant init opa-box
vagrant up
vagrant ssh
This works on my machine.
It's because the link leads to a redirect page to Google Drive. Bsdtar cannot open the archive because it's an HTML file. You can download it and add it using imikael21's instructions.
Here's the link it leads to: https://drive.google.com/uc?export=download&id=0B1UEOBxsn2GiN3ZpbFdMek1FNjQ
The attempted link: https://vagrantcloud.com/mlstate/opa/version/1/provider/virtualbox.box

Resources