Ghaf VMs Status Tool
Overview
Section titled “Overview”ghaf-vms is a command-line utility in Ghaf that provides real-time status information about running MicroVMs on the host system. It queries systemd to determine the state of each configured MicroVM and displays the information in a color-coded, easy-to-read format.
This tool is particularly useful for:
- Checking which VMs are running or stopped
- Debugging VM startup issues
- Monitoring the overall health of the MicroVM architecture
- Quick system status overview without navigating through systemd commands
Usage & Commands
Section titled “Usage & Commands”Run ghaf-vms on the Ghaf host to view VM status. General usage:
[ghaf@ghaf-host:~]$ ghaf-vms [OPTIONS]Options
Section titled “Options”-l— List all configured MicroVMs and their current status (default behavior)-h— Show usage instructions
Examples
Section titled “Examples”List all VMs and their status
Section titled “List all VMs and their status”[ghaf@ghaf-host:~]$ ghaf-vms -lOr simply:
[ghaf@ghaf-host:~]$ ghaf-vmsExample output:
VM Status: ========= audio-vm: running business-vm: running chrome-vm: running gui-vm: running ids-vm: running net-vm: running zathura-vm: stoppedStatus Indicators
Section titled “Status Indicators”The tool displays VMs with color-coded status indicators:
| Status | Color | Description |
|---|---|---|
RUNNING | Green | VM is currently active and running |
STOPPED | Red | VM is configured but not running |
FAILED | Bold Red | VM service failed to start |
ACTIVATING | Yellow | VM is in the process of starting |
| Other states | Cyan | VM is in another systemd state (e.g., deactivating, reloading) |
See Also
Section titled “See Also”- Creating Application VM — How to create new MicroVMs
- MicroVM Architecture — Understanding Ghaf’s VM architecture
- Troubleshooting — General troubleshooting guidance