Definition

Vagrant describes reproducible development environments in a Vagrantfile. The configuration records desired machines and setup rather than relying on repeated manual clicks. This is an example of infrastructure as code.

Distinguish the roles

TermRole
BoxPackaged base environment, typically an image plus metadata
ProviderBackend that creates and runs the environment, such as the lesson’s VirtualBox example
ProvisionerMechanism that configures guest software, such as a shell script

Vagrant orchestrates setup; a provider supplies the execution backend. A provisioner installs/configures software after or as part of environment creation. These are different jobs.

Added study example

A lab needs a VM with two vCPUs, 2048 MB RAM and particular packages. The lesson’s fragment inside a VirtualBox provider block is:

vb.memory = 2048
vb.cpus = 2

This is a partial illustration, not a standalone runnable Vagrantfile. It requests resources; it does not prove that physical cores are dedicated or that a host can satisfy every request.

The workflow is describe -> create -> use -> destroy/recreate when appropriate. Reproducibility depends on the referenced images and provisioning inputs as well as the configuration file.

Common mistakes

  • Calling Vagrant the hypervisor.
  • Confusing a box with a provisioner.
  • Assuming a resource declaration reserves physical cores.
  • Treating destroying an environment as preserving its unsaved data automatically.

Source

Lecture 05 - Computing Virtualization in Linux, shared teaching explanation for printed slides 28-29. The scenario is an added study example; no environment was created or destroyed.