Skip to content
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a838dcc
openvmm_entry: add VM-mutation gate to the ttrpc VmService
Oct 14, 2026
940b7e8
Guide: document the VM operation gate in the gRPC reference
Oct 14, 2026
cf6062f
openvmm_entry: address gate review feedback
Oct 15, 2026
0ced5c4
openvmm_entry: make teardown and quit terminal over in-flight changes
Oct 16, 2026
83bcdc4
Merge branch 'main' into marma/vm-operation-gate
marma-dev Oct 28, 2026
53d2ff7
vmm_tests: check Consomme port changes against the running-state rule
Nov 6, 2026
98d06cc
Merge branch 'main' into marma/vm-operation-gate
Nov 6, 2026
01853af
openvmm_entry: test cancelling an active gated operation
Nov 6, 2026
5be0e3f
openvmm_entry: clarify what terminal cancellation interrupts
Nov 6, 2026
87fc678
Merge branch 'main' into marma/vm-operation-gate
marma-dev Nov 9, 2026
96b9854
Merge branch 'main' into marma/vm-operation-gate
marma-dev Nov 10, 2026
ea82f6d
openvmm_entry: simplify the VM operation gate
Nov 10, 2026
c0f2622
Merge branch 'main' into marma/vm-operation-gate
Nov 11, 2026
094ab51
openvmm_entry: gate SaveVM and RestoreVM
Nov 11, 2026
55bbe59
openvmm_entry: gate only SaveVM, after its preconditions
Nov 11, 2026
c6c2a67
openvmm_entry: release a cancelled save's gate when the worker stops
Nov 11, 2026
e7da738
openvmm_entry: check Consomme state before options; bound the shared …
Nov 12, 2026
042862f
openvmm_entry: seal mutations after SaveVM
Nov 20, 2026
b4c567c
Merge remote-tracking branch 'upstream/main' into pr-4659-review-fixes
Nov 20, 2026
d98dc17
vmm_tests: use Quit after SaveVM
Nov 22, 2026
078df41
vmm_tests: tolerate Quit reply loss in lifecycle test
Nov 22, 2026
0c8cbd2
Merge remote-tracking branch 'upstream/main' into pr-4659-review-fixes
Nov 22, 2026
10346bf
openvmm_entry: complete terminal SaveVM waiters
Nov 23, 2026
aec0ff4
openvmm_entry: complete late terminal WaitVM
Nov 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 46 additions & 3 deletions Guide/src/reference/openvmm/management/grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,16 @@ before their implementation is connected end to end.
`state.bin`, and `memory.bin` to the requested directory. The VM must use the
`MemoryConfig.backing_file_path` setting. The currently supported
implementation hard-links that backing file into the snapshot, so after a
successful save the VM can't be resumed and should be torn down. Each save
generates a unique snapshot ID (a GUID string) that is stored in
successful save the VM is terminal and can't be resumed or reused. Its state
is `Halted` with halt reason `snapshot saved`; `PropertiesVM`, `WaitVM`, and
`Quit` remain available. `TeardownVM`, `CreateVM`, `RestoreVM`, and VM-changing
operations return `FAILED_PRECONDITION`. The management client must send
`Quit` and wait for process exit. Each save generates a unique snapshot ID (a
GUID string) that is stored in
`manifest.bin` and returned in `SaveVMResponse.snapshot_id`.
Cancelling `SaveVM` only stops the caller from waiting; the save may still
complete.
complete, so the service becomes terminal before waiting and remains terminal
until `Quit`.

`RestoreVM` creates a VM from a snapshot directory and a compatible
`VMConfig`. Device configuration is not stored in the snapshot and must be
Expand Down Expand Up @@ -145,6 +150,44 @@ Unlike `AddPcieDevice`, VPCI does not require a root complex or a predeclared
hotplug-capable PCIe port. `AddPcieDevice` remains available when standard PCIe
hotplug semantics or a non-VPCI host backend is required.

## Concurrent operations

The server rejects a VM-changing request that conflicts with one already in
flight, rather than queuing it.

| Operation | Class | While a device or resource change is in flight |
|---|---|---|
| `ModifyResource`, `AddPcieDevice`, `RemovePcieDevice`, `AddVpciDevice`, `RemoveVpciDevice` | Shared | Runs alongside it |
| `PauseVM`, `ResumeVM`, `SaveVM` | Exclusive | Rejected with `ABORTED` |
| `TeardownVM` before Save, `Quit` | Terminal | Cancels it; the change returns `CANCELLED` |

- A rejected request has no side effects, and the server never retries it.
- `PauseVM`, `ResumeVM`, `SaveVM`, and `TeardownVM` complete before the server
reads its next request, so they never conflict with each other. A request
sent meanwhile is read only afterwards, and is then admitted or rejected as
above.
- Cancelling a change stops the server waiting for it. A change the VM has
already received still completes, or is discarded when the VM stops; if the
VM is blocked on it (for example, on an unresponsive device backend),
stopping the VM waits for it.
- A client that cancels or disconnects does not end the operation early. If a
`SaveVM` client cancels, the save may still be writing the snapshot, so
the service remains terminal. Device and resource changes and lifecycle
operations return `FAILED_PRECONDITION`; the client must send `Quit` or
wait for the VM worker to stop.
Comment thread
marma-dev marked this conversation as resolved.
Resolved
- Once `SaveVM` commits, the VM operation gate is sealed. This prevents a
caller from accidentally resuming, mutating, tearing down, or recreating the
saved VM in the same process.
- `CreateVM`, `RestoreVM`, `WaitVM`, `CapabilitiesVM`, and `PropertiesVM` are
not gated. `CreateVM` and `RestoreVM` require that no VM exists, so no change
can be in flight. After a committed or uncertain Save, `CreateVM` and
`RestoreVM` are rejected with `FAILED_PRECONDITION` until `Quit`.
- Consomme NIC changes (`ModifyResource` `UPDATE` or `REMOVE` of a Consomme
NIC, including ports, DNS records, and virtual addresses) require a running
VM and otherwise fail with `FAILED_PRECONDITION`, before the rest of the
change is validated, because the NIC processes these changes only while the
VM runs.

## Hvsocket relay listeners

Use `ModifyResource` with `hvsocket_listener` to relay a host Unix socket to a
Expand Down
Loading
Loading