PPN VM resource pool architecture
The PointSav Private Network (PPN) VM resource pool is a three-service stack that provisions, places, and accounts for virtual machines across a heterogeneous WireGuard mesh. The pool combines cloud nodes with physical hardware, forming a distributed compute substrate that spans different capability profiles.
Three services partition the responsibility surface. The fleet controller maintains a global view of node capacity and handles placement decisions. The host agent runs per-node as the spawn authority, communicating with the hypervisor and holding the local state for each VM. The tenant proxy sits at the customer boundary, enforcing authentication, tenant namespace isolation, quota limits, and an immutable audit trail.
All service processes communicate across the PPN WireGuard underlay. No service exposes a public interface; all customer-facing traffic enters through the tenant proxy.
Fleet controller
The fleet controller maintains an in-memory registry of node state: available capacity, hardware virtualisation availability, current VM count, and reservation status.
Placement uses a two-pass selection algorithm. The first pass considers only non-reserved nodes, satisfying the requested capacity ceiling. If the first pass yields no candidate, the second pass widens the search to include reserved nodes. This separation allows operators to designate nodes for latency-sensitive workloads while still permitting overflow placement under load.
Fleet status endpoints provide a global view of node state and per-tenant VM listings. Heartbeat ingestion from host agents is trust-bounded by the WireGuard underlay and node identity, not by separate credentials.
Host agent
The host agent is the per-node spawn authority. Each node in the pool runs one instance, which accepts spawn and destroy requests forwarded by the fleet controller after placement.
On receiving a spawn request, the agent assembles the required initialisation configuration, invokes the hypervisor with the appropriate parameters, and writes state metadata alongside the disk image. This sidecar stores the VM identifier and enables heartbeat recovery after a process restart or node reboot without querying the fleet controller.
Nodes signal their reservation status and stable identity to the fleet controller at startup. Nodes where hardware virtualisation (KVM) is unavailable — such as cloud instances without nested virtualisation — report this capability flag in their heartbeat; the hypervisor falls back to software emulation on those nodes.
Tenant proxy
The tenant proxy is the customer-facing layer. It accepts spawn, destroy, and status requests from authenticated callers and enforces the tenant contract before forwarding to the fleet controller.
Authentication is bearer-token based, with each tenant assigned a max_vms/max_ram_mb quota at provisioning time. A tenant may not query, modify, or destroy VMs belonging to another tenant; the proxy enforces this at every endpoint before any fleet interaction. With an explicit token-to-tenant map configured, a bearer token is opaque and resolves to a tenant identifier server-side. Without one, the bearer token doubles as the tenant identifier directly — a documented, less-hardened fallback mode, not the sole authentication path.
Quota enforcement checks current allocated capacity against the ceiling before forwarding a spawn request; requests that would exceed the quota are rejected. Concurrent create requests are serialised through a single lock shared across all tenants, not a separate gate per tenant, closing the same TOCTOU window a per-tenant gate would but without per-tenant concurrency.
Every write operation is appended to a local, append-only audit file (timestamp, tenant identifier, operation, VM identifier) and forwarded, best-effort, to service-fs's WORM ledger as a durable secondary record; the local file remains authoritative if that forward fails.
WireGuard mesh
The PPN underlay uses a WireGuard mesh. All service processes bind to their WireGuard interface addresses, not to public interfaces. Peer configuration is static; each node holds the public keys of its peers and the routing ranges for each tunnel.
A cloud relay node forwards traffic between physical nodes that are on separate networks without a direct route, though WireGuard uses direct peer paths when available. The relay role does not require the cloud node to participate in VM placement — it operates at the network layer only.
Node heterogeneity is a deliberate property of the pool. Each node type contributes a different capability profile: cloud nodes provide reliable uptime and elastic storage; physical nodes provide hardware-accelerated virtualisation. Placement decisions reflect these differences through the capability flag and the two-pass reserved/non-reserved selection algorithm.
Planned extensions
Three extensions to the compute substrate are intended for future deployment; none is operational today.
Microkernel isolation (planned/intended): The VM spawn path on AArch64 hardware is intended to use a formally-verified microkernel component model. The intended design would replace the host kernel as the trust boundary for VM isolation, providing formal verification of the scheduler and inter-process communication paths between VMs.
Lightweight microVM (planned/intended): An alternative hypervisor backend is under evaluation for workloads where sub-second boot time and reduced memory overhead are priorities. The intended integration point is the host agent, which would select the hypervisor backend based on the workload type specified in the spawn request.
Bare-metal provisioning ISO (planned/intended): A signed, reproducible boot image is intended as the provisioning substrate for new PPN nodes. The planned design is intended to install the full node stack from a single boot, without requiring an existing operating system install or manual configuration.
See also
- PPN Small-Business Compute — the small-business product built on the PPN resource pool
- PPN Tenant VM Isolation — detailed isolation model and planned network-level isolation
- Software Distribution Substrate — binary distribution and license verification
Cite this record: /wiki/ppn-vm-resource-pool — revision f754176e, last updated 24 August 2026.