Skip to content

Hyper-V discovery and workflow architecture

Discovery is staged from a cheap role seed to progressively richer topology. Monitoring begins only after the target class exists, and each workflow runs where its target and data source can be evaluated safely. The MP prefers native event, service, performance, registry, and CIM providers; PowerShell is used where it supplies a materially better supported topology contract, not as a universal wrapper around every signal.

Staged discovery pipeline

Rendering diagram…

Each stage has an independently testable contract. A failure in detailed storage discovery must not erase the already proven Hyper-V host role or make the discovery pipeline appear healthy.

Discovery contract

Every discovery defines:

FieldRequired content
TargetNarrowest stable seed class
Execution locationAgent, cluster-managing HealthService, or approved resource pool
ProviderRegistry, service manager, event log, performance provider, CIM/WMI, PowerShell, or SDK
Key mappingSource field to every class key and hosting key
Relationship mappingSource, target, relationship type, and deletion behavior
ScheduleInterval, optional synchronization time, timeout, and jitter strategy if supported
CostExpected runtime, object count, data size, and provider calls
Failure behaviorEvent/logging, stale deadline, retry, and last-known-topology policy
SecurityDefault action account or named Run As profile with minimum permissions
Test fixturesEmpty, normal, maximum scale, malformed data, access denied, timeout, and topology change

Source selection

Rendering diagram…

Monitor, rule, or task

Rendering diagram…

Rules do not create durable current health. A condition that operators must see in Health Explorer after the original event has passed needs a monitor with a reliable healthy transition or reset.

Cookdown design

Rendering diagram…

Cookdown is required where multiple workflows can use the same module configuration and provider call. It is not assumed merely because scripts look similar: target, configuration XML, Run As, schedule, and module parameters must be identical. Workflow research records expected cookdown groups and lab evidence for each multi-instance data source.

Workflow execution placement

Signal ownerPreferred executionReason
Host-local service, event, counter, adapter, or switchAgent on that hostLowest latency and no remote credential path
VM runtime stateAgent currently responsible for the supported provider viewAvoid management-server fan-out; preserve VM identity separately from placement
Cluster-wide topologyProven cluster-managing agent or approved resource poolRequires one authoritative view and failover-safe execution
SCVMM/SDN management objectApproved management server/resource pool only if the variant is supportedKeep remote SDK access explicit and optional
DA membership reconciliationManagement server or resource-pool workflow with deterministic source relationshipsMembership spans objects managed by multiple HealthServices

Workflow state machine

Rendering diagram…

Retries must be bounded. Persistent failure becomes monitoring-pipeline health and actionable knowledge rather than an infinite retry loop or a silent Healthy result.

Topology-change sequence

Rendering diagram…

Authoring constraints

  • Use reusable composite module types for repeated acquisition and state logic.
  • Expose interval, timeout, enabled state, thresholds, consecutive samples, and recovery bands only when operators have a safe reason to override them.
  • Never pass secrets in script arguments, events, property bags, alert parameters, or debug output.
  • Emit one structured diagnostic event per failure episode, with throttling to prevent event storms.
  • Return no discovery data only when the source authoritatively reports absence. Access denied, timeout, or malformed output is a workflow failure, not proof that objects disappeared.
  • Keep collected properties deterministic; sort multi-instance results before building discovery data to make fixture comparison stable.
  • All script data must be validated for type, range, null, duplicate key, and encoding behavior.

Research gates

Workflow and lab research must validate source semantics, execution placement, cookdown, timeout, cardinality, failure behavior, and recovery before ADR 0028 is accepted or authoring begins.

Released under the MIT License.