Tuesday, August 1, 2017

Vagrant: frequently used commands

In everyday life you'll probably use the following two commands the most: vagrant halt to shutdown your machine, and vagrant up --provision to turn it on again.

vagrant up
This command creates and configures guest machines according to your Vagrantfile.
vagrant halt
This command shuts down the running machine Vagrant is managing.
vagrant destroy
This command stops the running machine Vagrant is managing and destroys all resources that were created during the machine creation process. After running this command, your computer should be left at a clean state, as if you never created the guest machine in the first place.
vagrant up --provision
Same as vagrant up, but with forcing the provisioners to run.

source: Vagrant CLI documentation

No comments:

Post a Comment