13
votes

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.

4
can you run vagrant box list to check which box you have available. The fact you have packaged an existing VM as a box does not mean you have it installedFrederic Henri
I repeated the process again and it worked this time. Still figuring out where i had gone wrong earlier. Thanks though.raviabhiram

4 Answers

4
votes

What I figured was that due to some reason vagrant had got corrupted. So doing a fresh install of vagrant did the trick.

2
votes

Make sure you have virtualbox installed if you are using ubuntu.

sudo apt install virtualbox-qt

0
votes

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)

-1
votes

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