4
votes

Is it possible to download a Vagrant box as a file from http://vagrantcloud.com ?

I've a PC with a very slow internet connection and I want add the box, downloaded from another pc, from the filesystem.

2
Vagrant cloud allows you to share boxes with others. If you're just looking to use a box downloaded by someone else, you can point directly to a downloaded file by using a file: url in config.vm.box_url. If that doesn't make sense, please post your Vagrantfile.Beel
If you have a working VM already on another machine, you could always re-package the VM and then move the .box file and import it on the other machine? Check out these instructions: abhishek-tiwari.com/hacking/…. You can use that too to make a custom box and re-package it.noeldiaz
@noeldiaz your solution was what I was looking for. If you turn it in an Answer I'll accept it.Hpatoio

2 Answers

12
votes

Yes you can. Vagrant cloud is currently managed by Atlas. To download a file you have to add version and provider in the URL. For example for downloading precise64 First you need its URL which is https://atlas.hashicorp.com/ubuntu/boxes/trusty64

then you have to add version and provider afterwards, for our example the download URL would be.

https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/14.04/providers/virtualbox.box

Then you have to add it locally from your vagrant file.

1
votes

Yes, you can download virtualbox.box from

https://app.vagrantup.com/laravel/boxes/homestead/versions/6.4.0/providers/virtualbox.box

You can change the version of homestead box. Current version: 6.4.0.

Check for the latest version here: https://app.vagrantup.com/laravel/boxes/homestead

After downloading the box, rename it to virtualbox.box or whatever name you like.

Don't forget to include the .box extension.

Add the downloaded homestead box to vagrant:

vagrant box add laravel/homestead /path/to/virtualbox.box

Change the path to where you stored your downloaded homestead box.