The principal command of Vagrant are defining the lifetime of the virtual machine.
Init a project directory to be used with vagrant.
cd myVagrantProjectDirectory
vagrant init
It will create a .vagrant directory into the directory project myVagrantProjectDirectory
and add a box. Bv for Ubuntu 64.
vagrant add hashicorp/precise64
vagrant up brings the box VM clone up in the provider (by default VirtualBox)
Vagrant runs the virtual machine by default without a UI to prove that it's running start an ssh session.
From this steps, you want to provision your Vm. See Vagrant - Provision (Code, Software Installation)
vagrant reload quickly restart the virtual machine, skipping the initial import step.
With Vagrant, you suspend, halt, or destroy the guest machine. Each of these options have pros and cons.
Cons and pro:
Pro and cons:
Pro and cons:
The vagrant destroy command does not actually remove the downloaded box file. To remove it, see vagrant box remove