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.
Related
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
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.
I'm installing the Phalcon Vagrant box through the official github documentation but I always stumble upon the same message:
vagrant#phalcon:/vagrant/www$ phalcon commands help
Your environment variable $PTOOLSPATH is outdated!
Current value: /opt/phalcon-tools
New value: /usr/bin
Exit.
Link to guide: Vagrant Phalcon Instructions
Why am I getting this error message?
This message prevents me from using the Phalcon dev-tools.
Things I've tried:
Re-install vagrant box
Update Vagrant to latest version
Update VirtualBox to latest version
Information about my system and software:
Vagrant 1.9.1
VirtualBox 5.1.12 r112440 (Qt5.6.2)
Windows 10 64-bit
[EDIT: This has been fixed in this commit: link to github commit]
The offical repository contains a bug that linked to the wrong file when using "phalcon commands".
The issue can be solved by editing the init.sh file in the cloned repository and changing ln -s /opt/phalcon-tools/phalcon.sh /usr/bin/phalcon to ln -s /opt/phalcon-tools/phalcon.php /usr/bin/phalcon
I also added chmod ugo+x /usr/bin/phalcon after this line (just to be sure). And behold it works now!
Keep in mind, for ease of use these changes need to be addressed before doing "vagrant up".
I have inherited a cheffed OSX machine running chef-client 11.14.6. I am trying to lay my hands on the installer for 11.14.6, but it seems that Chef have pulled it from the downloads site ( https://downloads.chef.io/chef-client/mac/ ).
Does anyone know anything about this, or know where I can get "archived" version?
Much appreciated.
I don't see any copies in any repos so it's probably lost to the mists of time by now. You should be able to build a new one using this commit from omnibus-chef https://github.com/chef/omnibus-chef/tree/6d5001c588edacc98f6045e22c70195200111660
Yes. From my research, and the research of others. It seems as if it has been removed.
However, we (I can't take the credit - it was one of my colleagues :) ) managed to get it working. We had another machine with the correct version on it, so we grabbed it from there and zipped it up (using root as the base, and grabbing /opt/chef).
Once tarball (e.g. opt.chef-11.14.6.tar.gz) is transferred to new machine, these were the steps used:
install chef-client v11.10.4 using:
(echo "version=11.10.4"; curl -L https://www.opscode.com/chef/install.sh) | sudo bash
verify your chef-client version is currently reported as 11.10.4 with "chef-client -v"
extract the tarball as root into the root filesystem using:
cd / && tar xvfz /tmp/opt.chef-11.14.6.tar.gz
verify your chef-client version is now reported as 11.16.4 with "chef-client -v"
run your knife bootstrap command like normal, but don't include the --bootstrap-version parameter, it'll detect chef-client is already installed and use the one you have installed manually.
I did not try rebuilding it.
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"