-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem statement
We already support SSH access into microVMs for “human debugging / exploration.” SSH is great for interactive usage, but it’s not the right primitive for automated job execution, result collection, and tight security defaults.
We should add a vsock-based control plane to run commands/jobs and return results efficiently without requiring guest IP networking.
Proposed design
In-guest: vsock-agent
A small daemon started at boot (systemd or init), listening on a fixed vsock port, e.g. PORT=5000.
Responsibilities:
- authenticate requests (token or per-VM secret)
- spawn commands with policy controls (timeouts, resource limits)
- stream stdout/stderr
- implement file transfer endpoints (optional)
- maintain job registry (
job_id → status)
Security requirements:
- default run as non-root user
- hard caps:
- max runtime per request
- max output bytes
- max file transfer size
- require auth token per request (passed on every call)
Host-side: vsock-client
A library + CLI integration used by our control plane:
- connect to VM CID and port
- request/response protocol
- stream logs
- fetch artifacts
Additional context
Target outcomes
Implement a vsock agent inside the microVM + a host-side client to support:
- Command/job execution
- Run command in guest
- Return:
exit_code,stdout,stderr,duration_ms - Optional:
env,cwd,stdin
- Streaming logs
- Stream stdout/stderr incrementally for long-running jobs
- Support cancellation
- File transfer (optional but strongly recommended)
put_file(local → guest)get_file(guest → local)
This unlocks “return results” (artifacts) without network.
- Health + metadata
healthget_system_info(kernel version, disk space, mem/cpu)shutdown
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request