Skip to content

Latest commit

 

History

History
53 lines (31 loc) · 1.32 KB

File metadata and controls

53 lines (31 loc) · 1.32 KB

Vagrant

Safari Books

vagrant --version

Create a new Vagrantfile (named precise64) using the specified box in the current directory:

vagrant init precise64 http://files.vagrantup.com/precise64.box

Then start the virtual machine:

vagrant up

Connect to the VM:

vagrant ssh

Other comamnds:

vagrant status
vagrant global-status
vagrant suspend
vagrant halt

Destroy the VM (without confirmation):

vagrant [destroy](http://docs.vagrantup.com/v2/cli/global-status.html) -f

Manage boxes

vagrant box list
vagrant box outdated
vagrant box remove <box>
vagrant box add | repackage | update

VCS

  • Commit the Vagrantfile but ignore the .vagrant directory (which contains machine-specific state).

Shared filesystem

  • By default the directory containing the Vagrantfile is shared as /vagrant in the VM.