- Rust 92.9%
- Shell 6.7%
- Makefile 0.4%
|
Some checks failed
Unit and Integration Test / test (push) Failing after 12s
Drop architecture.md, components.md, concepts.md, tutorial.md, user-guide.md, testing.md, and ci.md - all describe the Docker-like CLI that ADR-006 removed. Canonical architecture references are now ADR-006, the ADR-006 companion, and docs/discussion-vm-control-plane.md. docs/release.md kept for now pending a follow-up rewrite. All ADRs in docs/adr/ kept. |
||
|---|---|---|
| .forgejo/workflows | ||
| crates | ||
| docs | ||
| scripts | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| Makefile | ||
| README.md | ||
my_hypervisor
Narrow VM control-plane daemon for MOS. Runs cloud-hypervisor instances on behalf of the slice manager (hero_compute) and exposes lifecycle control over JSON-RPC 2.0 on a Unix socket.
Not a CLI. User-facing commands live in hero_compute and the MOS installer; my_hypervisor is a system daemon.
Scope
See ADR-006. In one paragraph: cloud-hypervisor lifecycle (spawn / supervise / reap), per-VM 8-state FSM with transition ring buffer, plumbing (serial console UDS, vsock exec proxy, hero_rpc2 adapter). Delegates OCI, storage, and networking preparation to other daemons.
Binaries
| Binary | Role |
|---|---|
| my_hypervisor-daemon | long-running root daemon; listens on the rpc socket |
| my_hypervisor-init | guest-side PID 1, statically linked via musl |
Build
cargo build --workspace --release
Integration with MOS image assembly lives in mos_builder.
Run (local dev)
sudo ./target/release/my_hypervisor-daemon \
--rpc-socket /run/my_hypervisor/rpc.sock \
--state-dir /run/my_hypervisor/vms \
--console-dir /run/my_hypervisor
Requires: KVM, cloud-hypervisor >= v50, root (for /dev/kvm and tap ioctls). See ADR-006 for the privilege stance.
socket mode defaults to 0600 root:root; group-grant policy deferred to the hero_rpc2 rethink.
RPC surface
compute.vm.* namespace over line-delimited JSON-RPC 2.0 at the rpc
socket. Supported methods: create, start, stop, remove, status, list,
events.tail, console.endpoint, logs, exec. See
crates/my_hypervisor-lib/src/rpc/server.rs or call rpc.discover.
Layout
crates/
my_hypervisor-lib/ library: orchestrator, FSM, state store, RPC adapter
my_hypervisor-daemon/ thin binary wrapping run_server()
my_hypervisor-init/ guest PID 1 (musl static)
Architecture documents
- ADR-006: the rewrite
- ADR-006 companion: v1 API + v1/v2 state.json
- discussion-vm-control-plane.md: committed design context
- [ADR-001..005]: historical; 003 and 005 are superseded by 006
License
MIT