| Previous | Next |
| ERROR_VID_STOP_PENDING | ERROR_VID_EXCEEDED_KM_CONTEXT_COUNT_LIMIT |
ERROR_VID_INVALID_PROCESSOR_STATE
ERROR_VID_INVALID_PROCESSOR_STATE is HRESULT 0xC037001D in the VID virtual-processor state machine area of the Windows virtualization stack. It applies to an operation that is not valid for the virtual processor's current lifecycle or execution state.
What the code establishes
The VP exists, but its state—created, running, suspended, stopping, reset, or deleted—does not permit the requested transition. Record both expected and observed state at the call boundary.
Neighboring result: STOP_PENDING is a specific transitional case. LIMIT_EXCEEDED concerns creating too many VPs. INVALID_PROCESSOR_STATE points to transition ordering for an existing VP.
Evidence that should survive remediation
| Evidence | Why it changes the diagnosis |
|---|---|
| VP state | Record state, run-thread ownership, index, and partition generation. |
| Requested transition | Keep start/run/stop/reset/delete operation and caller. |
| Prior transition | Locate the last successful state change and completion signal. |
| Concurrent control | Identify management, emulation, and cancellation threads touching the VP. |
Controlled diagnostic sequence
- Encode legal VP transitions and assert them before VID calls.
- Wait on completion events rather than assuming a command changed state synchronously.
- Make reset and teardown invalidate queued work.
- Run race tests among run, cancel, stop, and delete.
Reduce the reproducer to one partition and as few VPs as possible. In the diagnostic trace, instrument each run, exit, cancel, stop, reset, and delete transition so an asynchronous completion is not mistaken for an immediate state change.
Read the comparison tests
| Control | Interpretation | Hold constant |
|---|---|---|
| Instrumented run/stop race | Control run, cancel, intercept completion, stop, reset, and delete order. The first illegal transition explains it. | Keep one VP and one deterministic exit reason until ordering is proven. |
| One VP versus target count | If it appears only as processors are added, record the first failing index and capability/configuration limit. | Keep partition properties and host topology fixed. |
| Clean partition generation | A fresh partition changing it points to stale VP state, pending exits, or incomplete deletion rather than guest code. | Use identical VP indexes, registers, and run sequence in the result comparison. |
Avoid the wrong recovery
Repeated start/stop commands can obscure the first illegal VP transition behind it. Preserve run-thread, exit reason, pending intercept, cancellation, and state-completion order.
Acceptance test
Every control operation occurs from a documented state, and stress runs show no illegal transition or stale queued action.
Technical references
- Microsoft Open Specifications: HRESULT values — used to interpret this result.
- Microsoft: WHvCreateVirtualProcessor — used to interpret this result.
- Microsoft: WHvRunVirtualProcessor — used to interpret this result.
- Microsoft: WHvCancelRunVirtualProcessor — used to interpret this result.
Looking for a different code? Search another status or error code.
