Download vagrant boxes via tutorial syntax - vagrant

About to start tinkering with vagrant, looking at the second page of the tutorial
vagrant box add hashicorp/precise64
When I run this command however, I get
This command was not invoked properly. The help for this command is
available below.
Usage: vagrant box add [--provider provider] [-h]
I can see it takes a name before the URL, so I tried
vagrant box add ubuntu/trusty64 https://atlas.hashicorp.com/ubuntu/boxes/trusty64
but I get another error
bsdtar: Error opening archive: Unrecognized archive format
I want to download ubuntu/trusty64 specifically. What am I doing wrong?

You are using old version of Vagrant with newest documentation. You either need to update your Vagrant or read old docs.
Boxes system was revamped in 1.5 so your Vagrant is older than 1.5

I used a different site to get the boxes. The url needs to have a .box file
https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box

Related

how to add a local box file into vagrant box

I'm learning vagrant( https://www.vagrantup.com/intro/getting-started/boxes.html ) ,because I can't directly "vagrant box add hashicorp/precise64" as is written on the page, first I downloaded hashicorp/precise64, then added it. It said "box:successfully added box 'hashicorp/premise64'(v0) for virtualbox". Then I configured vagrantfile as is written on the page.But when I "vagrant up",it said"Box 'hashicorp/premise64' could not be found'. ..... Process 0%......".I've been searching a solution, but can't find.Can someone help? Thanks!
Awesome to see you trying out Vagrant as it is a very useful tool. Some background on hashicorp/precise64, this box is popular yes, but is a dated version of Ubuntu 12.04. I would recommend using ubuntu/xenial64 which is Ubuntu 16.04. To use this you will first run:
vagrant init ubuntu/xenial64
then
vagrant up
This process may take some time as it is initializing the box for the first time. Once it is up and running feel free to ssh into it:
vagrant ssh
I also recommend taking a look at their quick start guide here.

Spark VM box NOT getting created in windows

I am new to spark. Infact, I started learning it from today from edX.I am setting up my environment in windows so that sparkvm could be used.Following are the upto date Installations that I did on my PC.
Installed Virtualbox
Installed Vagrant
created a directory
C:\Users\Macro\myvagrant
and copy VagrantFile from (https://github.com/spark-mooc/mooc-setup/archive/master.zip)
Then I executed the following command from the specified path in dos.
vagrant up but the following message is coming every time.
How would I get out of this mess?
Update:
After downloading the file and executing the suggested code.I got following error.
vagrant is not able to download the box from its cloud.
you can try the following:
if you're behind a proxy, set the proxy :
export http_proxy=http://your.proxyhost.server:port/
export https_proxy=https://your.proxyhost.server:port/
vagrant up
download the box directly and install: download from https://atlas.hashicorp.com/sparkmooc/boxes/base2/versions/0.0.7.1/providers/virtualbox.box directly or you can use a downloader tool (such as wget as below)
wget https://atlas.hashicorp.com/sparkmooc/boxes/base2/versions/0.0.7.1/providers/virtualbox.box
Then you'll need to install the box
vagrant box add sparkmooc/base2 <location of downloaded box file>
vagrant up

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

command 'vagrant box add' fail

vagrantup.com says input vagrant box add hashicorp/precise32, But when I input it, the terminal outputs error message:
This command was not invoked properly. The help for this command is
available below.
Usage: vagrant box add <name> <url> [--provider provider] [-h]
Then, I input vagrant box add hashicorp/precise32 \ http://files.vagrantup.com/hashicorp/precise32.box,
But the download fail, with following error message.
Download failed. Will try another box URL if there is one.
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Couldn't open file /Users/XXXX/ http:/files.vagrantup.com/precise32.box
How do I do to install vagrant box?
The syntax for the vagrant box add subcommand is changed with the version 1.5, due to the Vagrant Cloud introduction.
From the output messages it seems that you're using an older version, so current documentation is not reliable for your case.
Here you can find a snapshot of the old documentation, in any case the syntax you need to use is like the following:
vagrant box add precise32 http://files.vagrantup.com/precise32.box

Resources