suspend_vm paused a QEMU guest (status/suspend without todisk) that nothing could bring back: PVE then lists it status: running, qmpstatus: paused, refuses start, and netOrk had no resume (NetOrk/netork#2658).
What changes
resume_vm(name): reads status/current, refuses a guest that is not paused (PVE would answer status/resume on a running guest with success and do nothing), and posts status/resume, waiting for its task like the other power actions.
A container is refused with a clear message. PVE does have POST /nodes/{node}/lxc/{vmid}/status/resume, but the container suspend it pairs with is marked experimental (CRIU), this driver refuses to suspend a container, and the container listing does not tell a suspended container from another, so nothing could offer it.
get_vms() asks for the full listing (GET /nodes/{node}/qemu?full=1), the only one with qmpstatus (PVE's vmstatus returns before the QMP queries unless full), and reports a guest whose qmpstatus is paused or suspended (asleep in S3, which status/resume wakes with system_wakeup) as "paused" (qemu_status).
Tests
tests/test_vm_contract.py: the listing asks for full=1; paused and S3 guests are paused, running and stopped stay; resume posts status/resume and waits; a guest that is not paused and a container are refused without a call. test_vm_contract.py, test_vm_migration.py, test_vm_snapshots.py: 75 passed locally.
get_vms stays at its baseline length.
To check on a live node
That qmpstatus is in GET /nodes/{node}/qemu?full=1 for a paused VM on the PVE version in use, and that status/resume returns a UPID.
Needs napalm-device-types' contract PR (same branch) only for the declaration; no runtime dependency. CHANGELOG under Unreleased; no version bump.
`suspend_vm` paused a QEMU guest (`status/suspend` without `todisk`) that nothing could bring back: PVE then lists it `status: running`, `qmpstatus: paused`, refuses `start`, and netOrk had no resume (NetOrk/netork#2658).
## What changes
- `resume_vm(name)`: reads `status/current`, refuses a guest that is not paused (PVE would answer `status/resume` on a running guest with success and do nothing), and posts `status/resume`, waiting for its task like the other power actions.
- A container is refused with a clear message. PVE does have `POST /nodes/{node}/lxc/{vmid}/status/resume`, but the container `suspend` it pairs with is marked experimental (CRIU), this driver refuses to suspend a container, and the container listing does not tell a suspended container from another, so nothing could offer it.
- `get_vms()` asks for the full listing (`GET /nodes/{node}/qemu?full=1`), the only one with `qmpstatus` (PVE's `vmstatus` returns before the QMP queries unless `full`), and reports a guest whose `qmpstatus` is `paused` or `suspended` (asleep in S3, which `status/resume` wakes with `system_wakeup`) as `"paused"` (`qemu_status`).
## Tests
- `tests/test_vm_contract.py`: the listing asks for `full=1`; paused and S3 guests are `paused`, running and stopped stay; resume posts `status/resume` and waits; a guest that is not paused and a container are refused without a call. `test_vm_contract.py`, `test_vm_migration.py`, `test_vm_snapshots.py`: 75 passed locally.
- `get_vms` stays at its baseline length.
## To check on a live node
That `qmpstatus` is in `GET /nodes/{node}/qemu?full=1` for a paused VM on the PVE version in use, and that `status/resume` returns a UPID.
Needs napalm-device-types' contract PR (same branch) only for the declaration; no runtime dependency. CHANGELOG under Unreleased; no version bump.
suspend_vm paused a QEMU guest that nothing could bring back: start is
refused because PVE still says the guest is running. resume_vm posts
status/resume for a paused VM and refuses a container or a guest that is
not paused. get_vms() asks for the full status and reports a guest whose
qmpstatus is paused or suspended as paused, not running.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
suspend_vmpaused a QEMU guest (status/suspendwithouttodisk) that nothing could bring back: PVE then lists itstatus: running,qmpstatus: paused, refusesstart, and netOrk had no resume (NetOrk/netork#2658).What changes
resume_vm(name): readsstatus/current, refuses a guest that is not paused (PVE would answerstatus/resumeon a running guest with success and do nothing), and postsstatus/resume, waiting for its task like the other power actions.POST /nodes/{node}/lxc/{vmid}/status/resume, but the containersuspendit pairs with is marked experimental (CRIU), this driver refuses to suspend a container, and the container listing does not tell a suspended container from another, so nothing could offer it.get_vms()asks for the full listing (GET /nodes/{node}/qemu?full=1), the only one withqmpstatus(PVE'svmstatusreturns before the QMP queries unlessfull), and reports a guest whoseqmpstatusispausedorsuspended(asleep in S3, whichstatus/resumewakes withsystem_wakeup) as"paused"(qemu_status).Tests
tests/test_vm_contract.py: the listing asks forfull=1; paused and S3 guests arepaused, running and stopped stay; resume postsstatus/resumeand waits; a guest that is not paused and a container are refused without a call.test_vm_contract.py,test_vm_migration.py,test_vm_snapshots.py: 75 passed locally.get_vmsstays at its baseline length.To check on a live node
That
qmpstatusis inGET /nodes/{node}/qemu?full=1for a paused VM on the PVE version in use, and thatstatus/resumereturns a UPID.Needs napalm-device-types' contract PR (same branch) only for the declaration; no runtime dependency. CHANGELOG under Unreleased; no version bump.
Merged as part of the release PR #71 (0.11.0, merge commit
ad3b5b2, tag v0.11.0).Pull request closed