# Vagrant Setup Guide

## Learning Objectives

The learning objectives for Vagrant Setup Guide are:

• Setting up a local VM using Vagrant

## Setup Instructions #

We are Vagrant to provision VMs. Vagrant allows us to provide a consistent VM environment, similar to your EngrIT-provisioned VM and the environment in which assignments will be graded.

Here are the steps to provision a VM on your own laptop using Vagrant:

1. You will first need to install Vagrant. You can do this by following the instructions at this page.

4. Next, make a directory called cs241-vm. Move the downloaded file from step (3) into this folder, and rename the downloaded file to Vagrantfile.
Now, everything needed for your VM should be installed. Here are some commands that you will need to use to connect to your personal VM. All these commands should be run in the cs241-vm directory (i.e. the directory that contains the Vagrantfile).
1. vagrant up - This command turns on and configures the VM according to the Vagrantfile.
2. vagrant halt - This command shuts down the VM.
3. vagrant ssh - You can use this command to SSH into the VM. Make sure that the VM is already running before trying to SSH into the VM.
If you want to use a VScode SSH plugin to edit the files on Vagrant VM, you can configure the plugin to connect to localhost port 2222 with user name “student” (e.g. ssh student@localhost -p 2222). No password is needed if you use the correct ssh config files.