vmm: Add support for resuming automatically on restore

Add an option that can be used when restoring to resume the VM. This is
particularly useful when restoring the VM via the direct VMM command
line, when you might not want/have an API socket configured.

Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
Rob Bradford
2026-03-17 09:30:01 -07:00
parent f4772e7f4c
commit 068b5ecb63
4 changed files with 108 additions and 34 deletions

View File

@@ -90,6 +90,15 @@ start using it.
./ch-remote --api-socket=/tmp/cloud-hypervisor.sock resume
```
Alternatively, the `resume` option can be used to automatically resume the VM
after restore completes:
```bash
./cloud-hypervisor \
--api-socket /tmp/cloud-hypervisor.sock \
--restore source_url=file:///home/foo/snapshot,resume=true
```
At this point, the VM is fully restored and is identical to the VM which was
snapshot earlier.