photoncloud-monorepo/docs/por/T011-plasmavmc-deepening/task.yaml
centra a7ec7e2158 Add T026 practical test + k8shost to flake + workspace files
- Created T026-practical-test task.yaml for MVP smoke testing
- Added k8shost-server to flake.nix (packages, apps, overlays)
- Staged all workspace directories for nix flake build
- Updated flake.nix shellHook to include k8shost

Resolves: T026.S1 blocker (R8 - nix submodule visibility)
2025-12-09 06:07:50 +09:00

115 lines
3.4 KiB
YAML

id: T011
name: PlasmaVMC Feature Deepening
status: complete
goal: Make KvmBackend functional - actual VM lifecycle, not stubs
priority: P0
owner: peerA (strategy) + peerB (implementation)
created: 2025-12-08
context: |
Scaffold complete (5 crates) but KvmBackend methods are stubs returning errors.
Spec defines 10 crates, but depth > breadth at this stage.
Focus: Make one hypervisor backend (KVM) actually work.
acceptance:
- KvmBackend.create() spawns QEMU process
- KvmBackend.status() returns actual VM state
- KvmBackend.start()/stop() work via QMP
- At least one integration test with real QEMU
- plasmavmc-server can manage a VM lifecycle end-to-end
## Gap Analysis (current vs spec)
# Existing: plasmavmc-types, hypervisor, kvm, api, server
# Missing: client, core, firecracker, mvisor, agent, storage (defer)
# Strategy: Deepen existing before expanding
steps:
- step: S1
action: Add QMP client library to plasmavmc-kvm
priority: P0
status: complete
owner: peerB
notes: |
QMP = QEMU Machine Protocol (JSON over Unix socket)
Use qapi-rs or custom implementation
Essential for VM control commands
deliverables:
- QmpClient struct with connect(), command(), query_status()
- Unit tests with mock socket
- step: S2
action: Implement KvmBackend.create() with QEMU spawning
priority: P0
status: complete
owner: peerB
notes: |
Generate QEMU command line from VmSpec
Create runtime directory (/var/run/plasmavmc/kvm/{vm_id}/)
Spawn QEMU process with QMP socket
Return VmHandle with PID and socket path
deliverables:
- Working create() returning VmHandle
- QEMU command line builder
- Runtime directory management
- step: S3
action: Implement KvmBackend.status() via QMP query
priority: P0
status: complete
owner: peerB
notes: |
query-status QMP command
Map QEMU states to VmStatus enum
deliverables:
- Working status() returning VmStatus
- State mapping (running, paused, shutdown)
- step: S4
action: Implement KvmBackend.start()/stop()/kill()
priority: P0
status: complete
owner: peerB
notes: |
start: cont QMP command
stop: system_powerdown QMP + timeout + sigkill
kill: quit QMP command or SIGKILL
deliverables:
- Working start/stop/kill lifecycle
- Graceful shutdown with timeout
- step: S5
action: Integration test with real QEMU
priority: P1
status: complete
owner: peerB
notes: |
Requires QEMU installed (test skip if not available)
Use cirros or minimal Linux image
Full lifecycle: create → start → status → stop → delete
deliverables:
- Integration test (may be #[ignore] for CI)
- Test image management
- step: S6
action: Wire gRPC service to functional backend
priority: P1
status: complete
owner: peerB
notes: |
plasmavmc-api VmService implementation
CreateVm, StartVm, StopVm, GetVm handlers
Error mapping to gRPC status codes
deliverables:
- Working gRPC endpoints
- End-to-end test via grpcurl
blockers: []
aux_tactical: []
evidence: []
notes: |
Foreman recommended PlasmaVMC deepening as T011 focus.
Core differentiator: Multi-hypervisor abstraction actually working.
S1-S4 are P0 (core functionality), S5-S6 are P1 (integration).