Vagrant Instance Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Vagrant Operations =Overview= =Instance Operations= ==up== {{External|https://www.vagrantup.com/docs/cli/up.html}} T...")
 
 
(2 intermediate revisions by the same user not shown)
Line 12: Line 12:
  vagrant up
  vagrant up


The backing Vagrantfile can be written in such a way that bringing the machine up creates a <tt>~/.ssh/dev/''vagranthostname''</tt> configuration that [[Ssh Include Named Configuration|can be used by ssh to connect directly]]. This is an example of how to achieve this: [[#Describe_the_VM_in_a_Vagrantfile|Describe the VM in a Vagrantfile]].
The backing Vagrantfile can be written in such a way that bringing the machine up creates a <tt>~/.ssh/dev/''vagranthostname''</tt> configuration that [[Ssh Include Named Configuration|can be used by ssh to connect directly]]. This is an example of how to achieve this: [[Vagrant_AWS_Provider#Vagrantfile_Example|AWS Provider Vagrantfile Example]].
 
==status==
 
vagrant status [''name''|''id'']
 
Also see: {{Internal|Vagrant_Environment_Operations#global-status|global-status}}
 
==destroy==
 
Stops and deletes all traces of the vagrant machine:
 
vagrant destroy
vagrant destroy [''name''|''id'']
 
If the corresponding VM runs in AWS EC2, this terminates the instance.

Latest revision as of 19:32, 17 November 2019

Internal

Overview

Instance Operations

up

https://www.vagrantup.com/docs/cli/up.html

This is the essential Vagrant command. It starts and provision the vagrant environment:

vagrant up

The backing Vagrantfile can be written in such a way that bringing the machine up creates a ~/.ssh/dev/vagranthostname configuration that can be used by ssh to connect directly. This is an example of how to achieve this: AWS Provider Vagrantfile Example.

status

vagrant status [name|id]

Also see:

global-status

destroy

Stops and deletes all traces of the vagrant machine:

vagrant destroy
vagrant destroy [name|id]

If the corresponding VM runs in AWS EC2, this terminates the instance.