vagrant-status
Check Vagrant machine status
TLDR
View status of the machines in the current directory
Target a machine by name or ID
SYNOPSIS
vagrant status [vm-name] [options]
Common Vagrant Options:
--debug
--machine-readable
--no-color
--parallel
--provider <name>
--timestamp
PARAMETERS
vm-name
Optional. Specifies a particular virtual machine to query. If omitted, the status of all defined machines in the Vagrantfile will be displayed.
--debug
Enables verbose debug output for troubleshooting Vagrant operations.
--machine-readable
Formats the output for easier parsing by other programs or scripts.
--no-color
Disables colorful output, useful for scripts or terminals that don't support ANSI escape codes.
--parallel
Executes actions in parallel across multiple machines when applicable (less direct impact on status but a global option).
--provider <name>
Forces Vagrant to use a specific provider (e.g., 'virtualbox', 'vmware_fusion') for the operation.
--timestamp
Prepends a timestamp to all log output, aiding in chronological analysis of events.
DESCRIPTION
The vagrant status command provides an overview of the current state of Vagrant-managed virtual machines within a project. When executed in a directory containing a Vagrantfile, it lists each defined VM and its corresponding status, such as running, saved, poweroff, or not created. This command is fundamental for monitoring the lifecycle of development environments, allowing users to quickly ascertain if a machine is active, suspended, or if it needs to be brought up. It's an indispensable tool for debugging and managing complex multi-machine Vagrant setups, offering immediate feedback on the health and operational status of your virtual infrastructure.
CAVEATS
The vagrant status command requires a Vagrantfile to be present in the current directory or a parent directory to function correctly. It reports the state as known to Vagrant; external manipulation of the VM (e.g., directly via VirtualBox GUI) might cause its reported status to temporarily differ from the actual state until Vagrant re-synchronizes. It does not provide real-time resource utilization metrics.
INTERPRETING STATUS OUTPUT
The command typically reports statuses like:
running: The VM is currently powered on and operating.
saved: The VM's state has been saved (suspended) to disk, consuming no CPU/RAM.
poweroff: The VM is powered off, but its disk images still exist.
not created: The VM has been defined in the Vagrantfile but has not yet been provisioned or brought up.
aborted: The VM's state is unknown or corrupted, often requiring a vagrant destroy and vagrant up.
GLOBAL STATUS
For managing multiple Vagrant environments across different directories, the vagrant global-status command provides a similar status overview for all active or recently active Vagrant machines on the host system, regardless of the current working directory.
HISTORY
The vagrant status command has been a core component of Vagrant since its early days, shortly after its initial public release around 2010. As Vagrant evolved to simplify the creation and management of reproducible development environments, the need for a quick and reliable way to check the state of virtual machines became paramount. This command serves as a foundational inquiry into the operational readiness of a Vagrant environment, remaining consistent in its purpose despite numerous feature additions and architectural changes to Vagrant itself.
SEE ALSO
vagrant up, vagrant halt, vagrant suspend, vagrant resume, vagrant destroy, vagrant ssh, vagrant global-status


