tpt-virtual
RustAn open-source, Rust-based microkernel VMM unifying VMs, containers, and WebAssembly workloads with hardware-level GPU/NPU virtualization. Built for the AI era and the post-Broadcom/VMware era of infrastructure freedom.
Languages
TPT Virtual
Infrastructure Freedom Through Technical Excellence
TPT Virtual is an open-source virtualization platform built in Rust. It provides a microkernel-style VMM that unifies VMs, containers, and WebAssembly workloads, plus a distributed orchestrator, storage/networking layers, and a VMware migration toolchain.
What's Implemented
These features are wired end-to-end through the CLI (tpt):
- VM lifecycle — create, start, stop, delete, snapshot via
VmManagerwith KVM acceleration (feature-gated, Linux only) - CLI —
tptbinary with subcommands for vm, snapshot, storage, network, cluster, migrate, gpu, container, wasm, policy, backup, and monitoring - Networking — virtual bridges, TAP devices, SDN/policy layer (
tpt-networking) - Storage — disk images, pools, replication, snapshots, block devices (
tpt-storage) - Monitoring — centralized logging, metrics collection, health checks, alerting (
tpt-commonobservability) - Cluster orchestration — multi-node scheduling, HA, migration coordination over gRPC (
tpt-orchestrator) - Backup/DR — full/incremental backups with disaster recovery (
tpt-storage) - GPU discovery — PCI enumeration on Linux via sysfs with IOMMU group detection
- Container/Wasm stubs —
ContainerManager,WasmManagerexist with placeholder implementations
What's Planned (Deep Runtime Integration)
- Real cgroups/namespace integration for containers (currently stubs)
- Real Wasmtime runtime integration (currently stubs)
- Real vCenter API client for VMware migration (currently stubs)
- Full gRPC transport for orchestrator communication
- Live migration with actual memory transfer
- Hardware GPU passthrough with VFIO binding
See spec.txt for the full design document and todo.md for the phased roadmap.
Architecture
┌─────────────────────────────────────────────────────────────┐
│ TPT Virtual Control Plane │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Web UI │ │ REST API │ │ CLI Tool │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ TPT Virtual Orchestrator │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Scheduler │ │ Networking │ │ Storage │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ TPT Virtual VMM (Rust) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ VM Manager │ │ ContainerMgr │ │ Wasm Runtime│ │
│ │ (KVM accel) │ │ (stub) │ │ (stub) │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Host OS (Minimal Linux) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Kernel │ │ Device Mgr │ │ Telemetry │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘
Crates
| Crate | Description |
|---|---|
tpt-common | Shared types, Workload trait, config, error, platform, monitoring |
tpt-vmm | VMM binary/lib — VmManager, KVM device emulation, GPU/container/Wasm backends |
tpt-orchestrator | Multi-node control plane, scheduler, HA, migration over gRPC |
tpt-storage | Disk images, pools, replication, snapshots, backup/DR, VMware migration |
tpt-networking | Virtual bridges, TAP devices, SDN/policy layer |
tpt-cli | clap-derived tpt binary — one subcommand tree per domain |
tpt-guest-agent | In-guest agent (heartbeat, shutdown) replacing VMware Tools |
web-ui/ | React + TypeScript + Vite SPA |
Build
Prerequisites
- Rust 1.86.0+ (see
rust-toolchain.toml) - Linux with KVM support (for VMM acceleration)
- Bazel 7.6.1+ (optional, for Bazel builds)
# Clone
git clone https://github.com/tpt-solutions/tpt-virtual.git
cd tpt-virtual
# Build (default features)
cargo build --workspace
# Build with KVM support (Linux only)
cargo build -p tpt-vmm --features kvm
# Or build with Bazel
bazel build //...
Test
cargo test --workspace
cargo test -p tpt-vmm vm_integration
Lint
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo fmt --all -- --check
Run
cargo run -- tpt vm list
cargo run -- tpt --help
CLI Usage
# VM lifecycle
tpt vm list
tpt vm create --name my-vm --cpus 2 --memory 2048
tpt vm start <vm-id>
tpt vm stop <vm-id>
tpt vm stats <vm-id>
tpt vm summary
# Snapshots
tpt snapshot list <vm-id>
tpt snapshot create <vm-id> my-snapshot
tpt snapshot restore <snapshot-id>
# Storage
tpt storage list
tpt storage create-disk my-disk --size 10G
# Networking
tpt network create my-net --ip 192.168.100.1/24 --dhcp
tpt network connect <vm-id> my-net
# GPU
tpt gpu scan
tpt gpu assign 0000:01:00.0 <vm-id>
# Containers / WebAssembly / Policies / Backup / Migration / Monitoring
tpt container list
tpt wasm load --name api --file api.wasm --wasi
tpt policy list
tpt backup create daily-full --type full --vms vm-001
tpt migrate connect vcenter.example.com --username admin
tpt monitor health
tpt monitor metrics
Development Phases
| Phase | Focus | Status |
|---|---|---|
| Phase 1 | Foundation — VMM, VM lifecycle, CLI, web UI | Complete |
| Phase 2 | Clustering — multi-node, storage, networking, HA | Complete |
| Phase 3 | VMware Migration — vCenter, VMDK, guest agents | Complete |
| Phase 4 | Advanced — GPU, containers, Wasm, SDN, backup | In progress (stubs wired) |
License
TPT Virtual is dual-licensed under:
You may choose either license for your use. All source files carry the SPDX identifier:
SPDX-License-Identifier: MIT OR Apache-2.0