Spark VM box NOT getting created in windows - 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

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.

Laravel Homestead vagrant up box issue

I am installing laravel homestead. As I am new on this so maybe i took some steps wrong while installing and setting up laravel homestead on windows.
I followed a tutorial and download laravel homestead box directly and then install it manually by giving it a local disk url. It installed perfectly fine till then. But now when i am trying to "vagrant up" command it says that box doesnt found.
So after that I read somewhere that it we have to add manyual metadata somewhere but I dont know where. And after some changes I am facing this error.
Once you have downloaded the box manually, you need to add it to vagrant config, so vagrant knows about the box for later user. run the following command :
$ vagrant box add --box-version <VERSION_DOWNLOADED> laravel/homestead <path to downloaded file>
After this, make sure to go to the folder where homestead has been cloned (do not do that from the .vagrant directory, just go somewhere else, and avoid path with space, windows generally does not like it; C:\homestead will be just fine for a test) and you can run vagrant up from there

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.

Download vagrant boxes via tutorial syntax

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

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