Skip to content

Instantly share code, notes, and snippets.

@ryansechrest
Last active January 27, 2019 22:18
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ryansechrest/8115004 to your computer and use it in GitHub Desktop.
Various cheat sheets for systems like Vagrant, Puppet, MySQL, etc.

Initialize

vagrant init [box-name] [box-url] — Add box and initialize VM

CentOS 6.5 box with Puppet:

vagrant init centos65p http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-puppet.box

CentOS 6.5 box without Puppet:

vagrant init centos65 https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box

Additional Boxes

OS Provider Installed Source
CentOS VirtualBox Chef, Puppet nrel.github.io »
CentOS, Debian, Fedora, SLES, Ubuntu Fusion, VirtualBox Puppet puppet-vagrant-boxes.puppetlabs.com »
Various VirtualBox Various vagrantbox.es »

Box Controls

vagrant box add [box-name] [box-url] — Add box to Vagrant

vagrant box list — Display added boxes in Vagrant

vagrant box remove [box-name] [box-provider] — Remove box from Vagrant

vagrant box repackage [box-name] [box-provider] — Create Vagrant box file

VM Controls

Start/Stop

vagrant up — Build, start, or resume VM

vagrant reload — Restart VM

vagrant suspend — Pause VM

vagrant halt — Shutdown VM

vagrant destroy — Destroy VM

Other

vagrant ssh — SSH into VM

vagrant ssh-config — See SSH configuration of VM

vagrant status — See VM status

vagrant package — Create box file of VM

vagrant provision — Configure VM according to provision scripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment