vagrant up: Usage, Options & Common CI Errors
Create and configure the dev environment described in your Vagrantfile.
vagrant up boots the virtual machine(s) defined in a Vagrantfile, downloading the box, creating the VM via a provider, and running provisioners. It gives every developer the same environment.
What it does
vagrant up reads the Vagrantfile, downloads the box if needed, creates and boots the VM through the chosen provider (VirtualBox, libvirt, Docker, Hyper-V), sets up networking and synced folders, and runs provisioners on first boot. If the VM already exists it resumes it instead.
Common usage
# Boot all machines in the Vagrantfile
vagrant up
# Use a specific provider
vagrant up --provider=virtualbox
# Boot one named machine without auto-provisioning
vagrant up web --no-provisionCommon error in CI: provider unavailable / box not found
On a CI runner, up fails with "No usable default provider could be found" (no virtualization on the host) or "The box you attempted to add doesn’t exist". Fix: install and select a provider the runner supports (Docker provider works on most CI; nested virtualization for VirtualBox often does not), pass --provider explicitly, and pin the box with a version. Vagrant is best for local dev - for CI prefer containers or pre-baked images unless the runner truly supports virtualization.
Key options
| Option | Purpose |
|---|---|
| --provider=NAME | Choose the provider |
| --provision / --no-provision | Force or skip provisioning |
| --provision-with | Run only named provisioners |
| [name] | Limit to a named machine |