Error when Vagrant Up running? - vagrant

I am using vagrant on Ubuntu 14.04 and the version of it is Vagrant 1.4.3. When I am tiring to up the vagrant, Its giving me following error every time.
Successfully added box 'precise64' with provider 'virtualbox'!
There are errors in the configuration of this machine. Please fix
the following errors and try again:
shell provisioner:
* The following settings shouldn't exist: run
My virtualbox version = 4.3.10_Ubuntur93012
Please help me on this its blocking my every workflow :(

Install the latest version of Vagrant on your Ubuntu machine (assuming 64-bit):
Remove your old version of Vagrant: sudo apt-get remove vagrant
Copy the Debian 64-bit download link from https://www.vagrantup.com/downloads.html
In your console, type wget, paste in the download link from step 2, and hit enter (should look like wget https://releases.hashicorp.com/vagrant/x.x.x/vagrant_x.x.x_x86_64.deb)
Enter sudo dpkg -i vagrant_x.x.x_x86_64.deb, where x.x.x is the current Vagrant version
Credits:
https://www.howtoforge.com/tutorial/ubuntu-vagrant-install-and-getting-started/
http://www.icchasethi.com/installing-latest-vagrant-and-virtualbox-version-on-ubuntu-12-01/

Related

Vagrant. The box you're attempting to add doesn't support the provider you requested

I created a vagrant box using vagrant package , uploaded it and released it.
Then I did vagrant init <username>/<box> which created a Vagrantfile. I even appended the box version to the Vagrantfile.
Next I did vagrant up --provider virtualbox. This tries to get the box locally and then when it can't find it, i get the error:
The box you're attempting to add doesn't support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.
If you're adding a box from HashiCorp's Atlas, make sure the box is
released.
I have given virtualbox as the provider and virtual box works fine with other boxes I use.
Make sure you have virtualbox installed if you are using ubuntu.
sudo apt install virtualbox-qt
What I figured was that due to some reason vagrant had got corrupted. So doing a fresh install of vagrant did the trick.
Upgrading vagrant version through installing .deb version worked for me (download through vagrant website: https://www.vagrantup.com/downloads - choose tab "Debian" and install the package)
I suffered for 2 hours but I don't want anyone to suffer ;)
1 - access the terminal (sudo) and, remove vagrant files
$ rm -rf /opt/vagrant
$ rm -f /usr/bin/vagrant
2 - then install it again as it has probably been corrupted.
$ curl -O https://releases.hashicorp.com/vagrant/2.2.9/vagrant_2.2.9_x86_64.deb
3 - install vagrant
$ sudo apt install ./vagrant_2.2.9_x86_64.deb
4 - confirm by viewing the installed vagrant version
& vagrant --version
be happy

error when using "vagrant box add laravel/homestead" on OSX

I am trying to add the laravel/homestead box to my vagrant installation and keep getting the error "The program 'vagrant' is currently not installed. You can install it by typing: sudo apt-get install vagrant"
I have virtual box installed and working (I use it regularly) and I just downloaded vagrant and it DID say it downloaded successfully. Some forums suggest my installation is not up to date but I installed it about 15 minutes ago so I don't think that could be the case.
Also, I have already created a new directory using mkdir, then used "vagrant init hashicorp/precise32" and then "vagrant ssh" which have all been successful. The next thing I try to do is add the box and it won't work. I have never used vagrant before so I am unfamiliar with this. Any help is appreciated!
PS I'm on OSX El Capitan
Not sure if this is useful after so many months, but I ran into this same problem yesterday. There appears to be a lot of information about this in the vagrant git forums.
As a workaround (not fix) I downgraded to virtualBox 5.0, and vagrant 1.7.4

Vagrant, can't download box

not sure why I'm having this issue but I can't add vagrant boxes.
Using windows 10, tried on powershell and simple command prompt. same issue. It's a relatively fresh install of windows. Maybe I'm missing some required package?
first i tried this command:
vagrant box add hashicorp/precise32
and got the error:
The box 'hashicorp/precise32' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:
URL: ["https://atlas.hashicorp.com/hashicorp/precise32"]
Error:
So I downloaded the box manually and tried this:
vagrant box add base64 file:///D:/downloads/vagrant_boxes/precise64.box
And got this error again:
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'base64' (v0) for provider:
box: Unpacking necessary files from: file:///D:/downloads/vagrant_boxes/precise64.box
box:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
The libraries on current version (as of this date) OSX don't support the version of curl bundled with Vagrant 1.8.7. I installed 1.8.6 and everything worked like a champ. To test this theory:
cd /opt/vagrant/embedded/bin
./curl --help
If you get a 'normal' reply than you should be fine or there's something else wrong.
I was using vagrant v1.8.0 when this happened. Later that day vagrant v1.8.1 was released. I didn't try that, instead I shifted back to v1.7.4 and the issue was gone.
I've been resolving this issue since I installed vagrant 1.8.1, I tried to installed lower version but i came up with the same problem. Hopefully, I solve it here:
first make sure you installed Microsoft Visual C++ 2010 SP1 Redistributable.
here is for 64bit https://www.microsoft.com/en-us/download/details.aspx?id=13523
next, download ssl version of curl in my case 64bit also. here:
https://curl.haxx.se/latest.cgi?curl=win64-ssl-sspi
now extract the curl.exe to C:\Vagrant\embedded\bin. please see your installation directory.
and then done. if your not using ssl try the no-ssl version of curl. hope helps
Check the C: \ HashiCorp \ Vagrant \ embedded \ bin \ curl.exe
case give an error, there is your problem.
To solve, just download gitbash, console2, cmder, etc ... you have curl installed, or try http://www.confusedbycode.com/curl/.
however strongly recommend gitbash or cmder
https://atlas.hashicorp.com/hashicorp/boxes/precise32
base on the offical URL.. there is only virutal box provider.
try below command:
vagrant init hashicorp/precise32; vagrant up --provider virtualbox
For MacOS users whom reinstalling new version of vagrant doesn't help:
sudo mv /opt/vagrant/embedded/lib/libiconv.2.dylib /opt/vagrant/embedded/lib/libiconv.2.dylib_
brew install libiconv
brew link --force libiconv
credits to: https://github.com/mitchellh/vagrant/issues/5782
You don`t need to add the box. Init instead of this:
vagrant init hashicorp/precise32
vagrant up
vagrant ssh
Hope it will be added in boxes list automatically.
If you want to set up local box - add it getting few steps:
D:
cd downloads/vagrant_boxes
vagrant box add base64 precise64.box
vagrant up
vagrant ssh

"Command not invoked properly" Setting up laravel homestead with Vagrant

I am trying to set up a a vagrant laravel homestead box. I have both vagrant and virtualbox installed on my Xubuntu 14.04 machine. To do this I'm running the following command
user#home: $ vagrant box add laravel/homestead
Then I get the following error
This command was not invoked properly. The help for this command is
available below.
Usage: vagrant box add <name> <url> [--provider provider] [-h]
I'm doing this exactly how the laravel and vagrant documentation shows. Why is this not working? Do I need a url?
Your syntax is correct for versions 1.5+.
If you older Vagrant you need go to https://vagrantcloud.com/<BOX_NAME>/versions and copy the full link to the latest active version of you box. (<BOX_NAME> in your case is laravel/homestead)
Then you can download like this:
vagrant box add 'laravel/homestead' https://vagrantcloud.com/laravel/homestead/version/9/provider/virtualbox.box --provider virtualbox
However I strongly advice to update your Vagrant for the latest one.

Vagrant 'box could not be found' error

I've installed Vagrant and VirtualBox to simulate Hadoop management (Apache Ambari). According to its installing documentation, i've done everything to create a vm (with 'vagrant up' command). I've installed manually lucid32 box file and placed it to the directory but it still says:
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* The box 'lucid32' could not be found.
What am i doing wrong?
I was able to get a box up using the latest install following this process.
# From your home directory, install the template box
vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
# From your project directory
vagrant init lucid32
vagrant up
Using Apache Ambari:
# clone from GitHub
git clone https://github.com/u39kun/ambari-vagrant.git
# Append these entries to ambari-vagrant/append-to-etc-hosts.txt
# ubuntu 12.4 hosts
192.168.12.101 u1201.ambari.apache.org u1201
192.168.12.102 u1202.ambari.apache.org u1202
192.168.12.103 u1203.ambari.apache.org u1203
192.168.12.104 u1204.ambari.apache.org u1204
192.168.12.105 u1205.ambari.apache.org u1205
192.168.12.106 u1206.ambari.apache.org u1206
192.168.12.107 u1207.ambari.apache.org u1207
192.168.12.108 u1208.ambari.apache.org u1208
192.168.12.109 u1209.ambari.apache.org u1209
192.168.12.110 u1210.ambari.apache.org u1210
# Modify your hosts file
sudo cat ambari-vagrant/append-to-etc-hosts.txt >> /etc/hosts
# Get up and running
cd ambari-vagrant/ubuntu12.4
vagrant up
There was a problem with the configuration of Vagrant. The error message(s)
are printed below:
vm:
* The box 'hashicorp/precise64' could not be found.
For me, this was a simple matter of using too old a version of vagrant (version 1.0.1).
Download the latest from: https://www.vagrantup.com/downloads.html
And then:
$ sudo dpkg -i vagrant_1.8.5_x86_64.deb

Resources