Vagrant is a HashiCorp tool that builds and manages reproducible virtual machine environments from one text file, the Vagrantfile. It works with providers such as VirtualBox to download a base box, boot it, set up networking and run provisioners. With the Vagrantfile in a shared repository, everyone on a team can start the same development or lab environment with vagrant up.

The posts here start with the basic workflow: installing VirtualBox and Vagrant, adding a CentOS 7 box and connecting with vagrant ssh. A command line reference and a collected tutorial reference support that workflow. Practical examples include a Vagrantfile that creates three Linux VMs for a multi-node lab and a Packer tutorial that builds a custom Vagrant box. For Chef users, there are Test Kitchen kitchen.yml examples that use the Vagrant driver with VirtualBox, Ubuntu and Windows to test cookbooks on a workstation.

Assignments, a DevOps training project and a set of interview questions help learners check what they know. The content is useful for DevOps beginners building a local practice lab, configuration management engineers testing code before it reaches servers, and candidates preparing for DevOps interviews.

Start here

Latest Vagrant articles

Virtualization in DevOps: Using Vagrant, Docker, and Cloud Platforms Together

This guide explains how VM-based workflows, containers, and cloud platforms complement each other in DevOps. It includes a practical workflow, trade-off table, and command examples for day-to-day use.

Read More

Vagrant Assignment & Excercise

Submit a assignment at https://www.debug.school/ and share your url in the comment section Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate…

Read More

Chef Tutorials: Test Kitchen – Example of kitchen.yml using vagrant

Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…

Read More

Chef Tutorials: Test Kitchen – Example of kitchen.yml using vagrant on ubuntu

Example of .kitchen.yml for driver_plugin vagrant with ubuntu for Chef Test Kitchen Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about…

Read More

Chef Tutorials: Test Kitchen – Example of kitchen.yml with VAGRANT and VirtualBox

How to test Chef recipes/cookbooks on your workstation with VAGRANT and VirtualBox using Test Kitchen Install Test Kitchen, VAGRANT and VirtualBox: Chef Test Kitchen: Test Kitchen is…

Read More

Chef Tutorials: Test Kitchen – Example of kitchen.yml with vagrant on Windows

Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…

Read More

Hashicorp Packer Tutorial: Creating Vagrant Box

Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…

Read More

Vagrant Tutorials Complete Reference

Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…

Read More

Vagrant Tutorials: command line reference

Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…

Read More

Vagrant Tutorial: Basic Workflow

Step 1- Download and Install VirtualBox https://www.virtualbox.org/wiki/Downloads Step 2- Download and Install Vagrant https://www.vagrantup.com/downloads Step 3 – Add a Box uRL to Vagrant Step 4 – Creating…

Read More

DevOps – SRE – DevSecOps – MDE Assignment & Project

Day 1 – What is DevOps and compare with SRE and DevSecOps? Day 2 – Docker Assignment for Interview Preparations Day 3 – Linux Lab & Assignment…

Read More

DevOps – Linux & VirtualBox & Vagrant Demo Tutorial

Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…

Read More

Vagrant: vagrantfile example for creating 3 linux vms

Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…

Read More

Vagrant Installation & Configuration

Step 1 – Download Vagrant URL – https://www.vagrantup.com/downloads Step 2 – Install Vagarnt in Windows Step 3 – Verify Vagrant Step 4 – Basic Workflow in Vagrant…

Read More

Vagrant Interview Questions And Answers

1) What is Vagrant? A) Vagrant is an open-source software product for building and maintaining portable virtual software development environments, e.g. for VirtualBox, Hyper-V, Docker, VMware, and…

Read More

Vagrant: frequently asked questions

What is the difference between Vagrant and Docker?

Vagrant manages full virtual machines, each with its own operating system and kernel. Docker runs containers that share the host kernel. Vagrant suits complete OS environments and multi-VM labs, while Docker is lighter for packaging applications, and Vagrant can also use Docker as a provider.

What is a Vagrant box?

A box is a packaged base image for a specific provider, such as VirtualBox. You add one with vagrant box add, reference it with config.vm.box in the Vagrantfile, and can build custom boxes with tools like Packer.

What is the difference between vagrant halt and vagrant destroy?

vagrant halt shuts the VM down and keeps its disk, so the next vagrant up resumes with the same state. vagrant destroy deletes the VM and its disk. The Vagrantfile is kept, so vagrant up builds a fresh VM.

Is Vagrant an infrastructure as code tool?

Yes, for local environments. The Vagrantfile is Ruby-based code that defines machines and provisioning, and it can be version controlled. Vagrant targets development and test labs, not production infrastructure, which is usually handled by tools like Terraform.