Skip to content

Commit 98c6139

Browse files
committed
docs: note CPU host-core limit and restore staging safety
--cpu now rejects requests exceeding runtime.NumCPU() instead of silently clamping. Restore now stages the snapshot into a scratch directory before killing the running VM — reflect both in the README.
1 parent 298849d commit 98c6139

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Applies to `cocoon vm create`, `cocoon vm run`, and `cocoon vm debug`:
174174
| ----------- | ---------------- | --------------------------------------------- |
175175
| `--fc` | `false` | Use Firecracker backend (OCI images only) |
176176
| `--name` | `cocoon-<image>` | VM name |
177-
| `--cpu` | `2` | Boot CPUs |
177+
| `--cpu` | `2` | Boot CPUs (must not exceed host core count) |
178178
| `--memory` | `1G` | Memory size (e.g., 512M, 2G) |
179179
| `--storage` | `10G` | COW disk size (e.g., 10G, 20G) |
180180
| `--nics` | `1` | Number of network interfaces (0 = no network) |
@@ -549,7 +549,7 @@ cocoon vm restore my-vm my-snap
549549
cocoon vm restore --cpu 4 --memory 4G my-vm my-snap
550550
```
551551

552-
Cocoon internally restarts the Cloud Hypervisor process with the snapshot's memory and disk state. Network is fully preserved — same IP, same MAC, same network namespace. No guest-side reconfiguration is needed (unlike clone).
552+
Cocoon stages the snapshot into a scratch directory first, then restarts the hypervisor process only after the full extraction succeeds — a truncated or corrupt snapshot stream errors out with the running VM still intact. Network is fully preserved — same IP, same MAC, same network namespace. No guest-side reconfiguration is needed (unlike clone).
553553

554554
### Restore Constraints
555555

0 commit comments

Comments
 (0)