Installing Vagrant is extremely easy. Head over to the Vagrant downloads page and get the appropriate installer or package for your platform. Install the package using standard procedures for your operating system. The installer will automatically add vagrant to your system path so that it is available in terminals.
As mentioned in the docs, boxes are stored at: Mac OS X and Linux: ~/. vagrant. d/boxes.
vagrant box add my-box file:///d:/path/to/file.box
Has to be in a URL format.
You can point to the folder where vagrant and copy the box file to same location. Then after you may run as follows
vagrant box add my-box name-of-the-box.box
vagrant init my-box
vagrant up
Just to check status
vagrant status
Try to change directory to where the .box
is saved
Run vagrant box add my-box downloaded.box
, this may work as it avoids absolute path (on Windows?).
Alternatively to add downloaded box, a json file with metadata can be created. This way some additional details can be applied. For example to import box and specifying its version create file:
{
"name": "laravel/homestead",
"versions": [
{
"version": "7.0.0",
"providers": [
{
"name": "virtualbox",
"url": "file:///path/to/box/virtualbox.box"
}
]
}
]
}
Then run vagrant box add
command with parameter:
vagrant box add laravel/homestead /path/to/metadata.json
Solution for Windows:
.box
filevagrant box add --name name_of_my_box 'name_of_my_box.box'
vagrant box list
should show the new box in the listSolution for MAC:
.box
filevagrant box add --name name_of_my_box "./name_of_my_box.box"
vagrant box list
should show the new box in the listFirst rename the Vagrantfile then
vagrant box add new-box name-of-the-box.box
vagrant init new-box
vagrant up
Just to check status
vagrant status
that's all
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With