Generate Vagrant configuration files for VM setup and provisioning. Part of the DevTools Surf developer suite. Browse more tools in the Developer Utilities collection.
Use Cases
Create a reproducible development environment for a team working across macOS, Windows, and Linux.
Test infrastructure provisioning scripts in a local VM before deploying to cloud servers.
Spin up isolated testing environments for different application versions without Docker overhead.
Generate Vagrantfile configurations for multi-machine setups (web server + database + cache).
Tips
Pin the base box version explicitly (config.vm.box_version = '3.1.0') rather than using 'latest' — base box updates can introduce breaking changes to provisioning scripts.
Use shared folders sparingly — VirtualBox shared folder performance is significantly slower than native disk I/O and can make development builds 5–10x slower.
Provision with shell scripts for simple setups; use Ansible provisioning when the same configuration needs to be applied to both Vagrant VMs and production servers.
Fun Facts
Vagrant was created by Mitchell Hashimoto in 2010 as a side project to automate his own development environment setup. He later founded HashiCorp in 2012, which built an infrastructure tool portfolio around Vagrant's conventions.
Vagrant introduced the concept of the 'base box' — a versioned, sharable virtual machine image — which became the standard abstraction for reproducible development environments before Docker containers replaced VMs in many workflows.
By 2015, Vagrant had over 10 million downloads. Its adoption has declined since 2016 as Docker containers provide lighter-weight, faster-starting alternatives for most development environment use cases.
FAQ
Vagrant vs. Docker — when should I use Vagrant?
Use Docker for application isolation and stateless services. Use Vagrant when you need a full OS environment, Windows VMs on macOS, or when provisioning scripts must match production bare-metal servers exactly. Most new projects prefer Docker.
What is a Vagrant box?
A Vagrant box is a versioned, packaged VM image that serves as the starting point for a Vagrant environment. Boxes are hosted on Vagrant Cloud (app.vagrantup.com). Popular boxes include ubuntu/jammy64, hashicorp/bionic64, and generic/rocky8.