Vagrant
Vagrant is the command line utility for managing the lifecycle of virtual machines. It lets you create and configure lightweight, reproducible, and portable development environments using a single declarative configuration file called a Vagrantfile. Instead of spending hours setting up development environments manually, you run vagrant up and get a fully configured, isolated virtual machine ready to code on.
Developed by HashiCorp (now part of IBM since 2024), Vagrant sits on top of existing virtualisation providers like VirtualBox, VMware, Hyper-V, and Docker. It makes the “it works on my machine” excuse a relic of the past by ensuring every developer on your team runs identical environments, regardless of their host operating system.
Key Features
- Vagrantfile — Declarative configuration-as-code for defining VM environments using a Ruby-based DSL
- Boxes — Pre-packaged VM templates (base images) available from a public catalog or custom-built
- Multiple Providers — Supports VirtualBox, VMware, Hyper-V, and Docker natively; AWS, OpenStack, Azure, Google Cloud, and more via plugins
- Provisioning — Automate software installation using shell scripts, Ansible, Puppet, Chef, Salt, or cloud-init
- Synced Folders — Real-time bidirectional file synchronisation between host and guest machines
- Networking — Port forwarding, private networks, public networks, and configurable network topologies
- Multi-Machine — Define and manage multiple VMs in a single Vagrantfile for complex environments
- Plugin System — Extensible architecture for custom providers, provisioners, and commands
- Disposable Environments — Easy
vagrant destroy + vagrant up cycle for fresh, clean environments every time
- Vagrant Share — Securely share access to running Vagrant environments with remote team members
Why Use It
Vagrant eliminates the most frustrating problem in software development: environments that work on one machine but not another. A single vagrant up command replaces pages of setup documentation and hours of manual configuration. It’s portable between local providers (VirtualBox, VMware, Hyper-V) and cloud providers (AWS, Azure, Google Cloud) using the same Vagrantfile. New team members go from cloning the repository to having a working development environment in minutes instead of days.
Use Cases
- Local development environments — Isolate project dependencies (databases, language runtimes, services) in dedicated VMs per project
- DevOps and infrastructure testing — Test provisioning scripts, Ansible playbooks, Chef cookbooks, and Puppet modules locally before deploying
- CI/CD debugging — Replicate CI pipeline environments locally to reproduce and fix build failures
- Cross-platform team development — Ensure everyone runs identical environments whether they use macOS, Windows, or Linux
- New developer onboarding — Team members simply clone the repo and run
vagrant up
- Educational and training labs — Distribute pre-configured VM environments for workshops, courses, and hackathons
Platform
Linux · macOS · Windows
Licence
Business Source License 1.1 (BSL 1.1) — automatically converts to MPL 2.0 four years after each version’s release date. Internal organisational use is free; commercial hosting-as-a-service requires a paid licence. Earlier versions (v2.4.2 and older) were released under MPL 2.0.
Website
http://www.vagrantup.com
Views: 1