Set Vagrant box file location
By default, the Vagrantfile has the box defined like this:
config.vm.box = "hashicorp/precise32"
By using this, Vagrant will attempt to find the box “precise32” from the provider “hashicorp” in Vagrant Cloud. If it finds it, the box will be downloaded and installed. What if you want to use your own box file, be it local or on a server? To specify the location of the box file, use one of the following, depending on the location of the box file:
config.vm.box_url = "file:///c:/Users/Razvan/lucru/box/origfiles/magento.box" config.vm.box_url = "http://mocanu.biz/boxes/magento.box"
So, the Vagrant file should look like this:
# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "MyBox" config.vm.box_url = "file:///location/to/file/name.box" config.vm.network "private_network", ip: "192.168.10.10" end
That’s it. Enjoy Vagrant.