A Vagrant box is a base image that clones a virtual machine, for example an ubuntu server or a server containing everything to run a Laravel project.
Add a box to your computer vagrant box add VENDOR\BOXNAME
.
Remove a box from your computer vagrant box remove VENDOR\BOXNAME
.
Boxes are saved in ~/.vagrant.d/boxes
.
Assign the box in the project Vagrantfile config.vm.box
property.
Start the machine specified in the project Vagrantfile vagrant up
.
Pause the machine in it's current state vagrant suspend
.
Shut the machine down vagrant halt
. The machine is still available and can be restarted with vagrant up
.
Restart the machine vagrant reload
. This is equivalent to vagrant halt
, vagrant up
.
Use vagrant reload
after a change to the Vagrantfile. Force the provisioners with --provision
flag as the provisioners only run on the first up that creates the environment.
Quickly run the provisioners vagrant provision
.
Destroy the machine vagrant destroy
. This will remove entirely including all databases.
Install software and configure the machine during the up process. This only runs on the first up that creates the environment.