Overview stopped VM count should use explicit stopped status
Noticed this while looking at the overview on a six-cluster setup.
The "VMs Stopped" number appears to be derived as totalVms - runningVms in the overview UI. That works only when every non-running guest is actually stopped. It can mislabel other guest states as stopped, and it also makes the label a little misleading because the backend already exposes explicit stopped counts.
There is a similar pattern in the group status path: the loop increments stopped in the else branch after checking for running, so any non-running status becomes stopped.
Expected behavior:
- count running only when
status == "running" - count stopped only when
status == "stopped" - keep total as the broader guest total if you want it to include templates/paused/suspended/etc.
Local hotfix tested on my install:
- backend group totals now use an explicit
elif status == "stopped" - overview/group UI now carries
stoppedVmsand displays that instead oftotalVms - runningVms
After the local patch, the estate reads cleanly:
- all clusters: 30 running / 26 stopped
- on-prem group: 21 running / 4 stopped
- labs group: 9 running / 22 stopped
I'll keep the PR for this to only this count/label issue, per your note on keeping contributions smaller and single-purpose.
Opened the small fix PR here: #750. Kept it to just the stopped-count issue.
Good catch, and thanks for the tested breakdown — that matches what we found.
Fixed on Testing:
- the group-status loop now increments stopped only on
status == "stopped", so paused/suspended guests and templates no longer land in the stopped bucket (the old catch-allelsewas the culprit); - the all-clusters overview and the per-node cards carry the backend's explicit stopped count instead of
total − running.
Total still covers every guest, so running + stopped won't always equal it — which is what you asked for. Ships in the next release.
Shipped in v1.1.0 — closing this out. Reopen if it still shows up for you.