Skip to content

Host maintenance stops VMs without a VM.STOP event or alert #14894

In review

Description

@bhouse-nexthop

Problem

When a host goes into maintenance and one of its VMs can't be moved off it, CloudStack stops that VM. Maintenance still succeeds. Nothing in events or alerts says the VM was stopped, so the owner usually finds out because their workload went down.

Case What happens Event / alert today
No other Up host in the cluster, migration not allowed, or vGPU offering HA ForceStop work stops the VM none
VM on local storage with host.maintenance.local.storage.strategy=ForceStop HA ForceStop work stops the VM none
Migration to the chosen host fails orchestrateMigrateAway force-stops the VM only a generic VM.MIGRATE error ("Unexpected exception ... migration"), no VM.STOP

User and out-of-band stops do record a VM.STOP event, so this is a gap only for stops caused by maintenance.

Steps to reproduce

  1. Run a VM on a KVM host that is the only Up host in its cluster (or put the VM on local storage with the ForceStop strategy).
  2. prepareHostForMaintenance on that host.
  3. The host reaches Maintenance and the VM is Stopped. listEvents shows no VM.STOP for the VM, and listAlerts shows nothing.

Expected

A VM.STOP event against the VM's owner saying host maintenance stopped it, plus an alert.

Versions

4.22 (also main). KVM.

Related: #13189 stops orchestrateMigrateAway from force-stopping a VM when its migration fails, and retries the migration instead. With that change only the first two rows above can still stop a VM.

Activity

  1. github-actions commented on Dec 2, 2026

    @github-actions

    Warning

    threat detection engine error
    The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

    What happened

    The threat detection engine failed to produce results.

    Review the workflow run logs for details.

    🎯 Triage report

    When host maintenance cannot move a VM off the host, CloudStack stops the VM through HA ForceStop work, or force-stops it after a failed migration. Maintenance still succeeds, and no VM.STOP event or alert is recorded. Users only learn of the stop when their workload goes down. Out-of-band and user stops do record VM.STOP, so the gap is limited to maintenance-driven stops.

    📊 Assessment

    Dimension Value Reasoning
    Type type:enhancement Missing event and alert for a stop; behaviour is otherwise as designed
    Component component:management-server Host maintenance and HA stop paths in the management server
    Severity n/a Not a bug report; the stop itself is expected, the lack of notice is the gap
    Labels type:enhancement, component:management-server
    Coding agent Needs more info Needs a decision on the event text and whether the alert is per VM or per host

    🔗 Similar issues

    💡 Notes and suggestions

    Generated by Daily Issue Triage · copilot · haiku55 · ~6 AIC · ⊞ 3.8K · ◷

    Add this agentic workflow to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/daily-issue-triage.md@139fa09ef17cde4135e696ff8e7af09bc5ddfa6e
    
  2. added this to the 4.22.3 milestone on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions