Skip to content

Instantly share code, notes, and snippets.

@vcarmen
Created November 9, 2018 02:13
Show Gist options
  • Save vcarmen/c18ddc5a830c87c38a4a4fada661722b to your computer and use it in GitHub Desktop.
Save vcarmen/c18ddc5a830c87c38a4a4fada661722b to your computer and use it in GitHub Desktop.
Vagrant commands
# Otherwise connection errores will displayed, after doing up you can edit and add the keys
# How to generate an existing box to share
vagrant package --output mynewbox.box
# Add shared box, you must specified the file full path
vagrant box add my-box file:///f:/courses/boxes/newbox.box
# In order to verify that box was added, you could run
vagrant box list
# this is example result of the box added manually
#hashicorp/precise64 (virtualbox, 1.1.0)
#my-box (virtualbox, 0)
#ubuntu/trusty64 (virtualbox, 20181031.0.1)
# Show global status of the vm's running / stopped
vagrant global-status
# Init using box added
vagrant init my-box
# Edit the vagrant file to have config.ssh.insert_key = false
# Up it
vagrant up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment