A Rust-based control plane for managing microVMs with support for multiple hypervisors including Firecracker and Cloud-Hypervisor.
_____ _ _ _
/ ____| (_) | |
| | __| |_ __| | _____ __
| | |_ | | |/ _` |/ _ \ \/ /
| |__| | | | (_| | __/> <
\_____|_|_|\__,_|\___/_/\_\
- Multi-hypervisor support - Control both Firecracker and Cloud-Hypervisor VMs through a unified interface
- REST API for VM lifecycle management (create, start, stop, pause, delete)
- Web UI - Modern Leptos-based web interface for VM management
- Interactive CLI (
gxctl) with command history and tab completion - Interactive console - connect to VM serial console with full I/O support
- Console logging - persistent logs of all VM console output
- Multi-client support - multiple CLI sessions can connect to the same VM console
# Clone the repository
git clone https://github.com/yourusername/glidex.git
cd glidex
# Run the installer (installs Rust, Firecracker, builds the project)
./install.shThe installer will:
- Install Rust (if not present)
- Download and install Firecracker v1.14.0
- Build the Glidex binaries
- Optionally download sample kernel and rootfs images to
~/.glidex/
For Cloud-Hypervisor support, install it separately:
# Download Cloud-Hypervisor (check https://github.com/cloud-hypervisor/cloud-hypervisor/releases for latest)
wget https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/v44.0/cloud-hypervisor-static
chmod +x cloud-hypervisor-static
sudo mv cloud-hypervisor-static /usr/local/bin/cloud-hypervisor# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Build the project
cargo build --release
# Binaries are in target/release/
# - glidex-control-plane (server)
# - gxctl (CLI)- Start the control plane server:
cargo run --bin glidex-control-planeThe server listens on http://localhost:8080 by default.
- Option A: Start the Web UI:
cd crates/glidex-ui
cargo leptos watchOpen http://localhost:3000 in your browser.
- Option B: Start the CLI:
cargo run --bin gxctl- Create and start a VM (via CLI):
gxctl> create
VM name: my-vm
vCPU count [1]: 2
Memory (MiB) [512]: 1024
Kernel image path [~/.glidex/vmlinux.bin]:
Root filesystem path [~/.glidex/rootfs.ext4]:
Kernel arguments (optional):
Hypervisor [firecracker/cloudhypervisor] (default: cloudhypervisor):
gxctl> start my-vm
- Connect to the VM console:
gxctl> connect my-vm
Press Ctrl+] to detach from the console.
- View console logs:
gxctl> log my-vm
| Command | Description |
|---|---|
list |
List all VMs |
get <name|id> |
Show VM details |
create |
Create a new VM (interactive) |
start <name|id> |
Start a VM |
stop <name|id> |
Stop a VM |
pause <name|id> |
Pause a running VM |
connect <name|id> |
Connect to VM console (interactive) |
log <name|id> |
Show VM serial console log |
delete <name|id> |
Delete a VM |
health |
Check API server health |
help |
Show available commands |
exit |
Exit the CLI |
| Method | Endpoint | Description |
|---|---|---|
GET |
/health |
Health check |
GET |
/vms |
List all VMs |
POST |
/vms |
Create a new VM |
GET |
/vms/{id} |
Get VM details |
DELETE |
/vms/{id} |
Delete a VM |
POST |
/vms/{id}/start |
Start a VM |
POST |
/vms/{id}/stop |
Stop a VM |
POST |
/vms/{id}/pause |
Pause a VM |
GET |
/vms/{id}/console |
Get console connection info |
{
"name": "my-vm",
"vcpu_count": 2,
"mem_size_mib": 1024,
"kernel_image_path": "/path/to/vmlinux.bin",
"rootfs_path": "/path/to/rootfs.ext4",
"kernel_args": "console=ttyS0 reboot=k panic=1 pci=off",
"hypervisor": "cloudhypervisor"
}The hypervisor field is optional and defaults to "cloudhypervisor". Supported values:
"cloudhypervisor"- Use Cloud-Hypervisor (default)"firecracker"- Use Firecracker hypervisor
# Create a VM
curl -X POST http://localhost:8080/vms \
-H "Content-Type: application/json" \
-d '{
"name": "test-vm",
"vcpu_count": 2,
"mem_size_mib": 512,
"kernel_image_path": "/home/user/.glidex/vmlinux.bin",
"rootfs_path": "/home/user/.glidex/rootfs.ext4"
}'
# Start the VM
curl -X POST http://localhost:8080/vms/{vm-id}/start
# List VMs
curl http://localhost:8080/vms┌─────────────────────────────────────────────────────────────┐
│ glidex-ui (Web UI) │
│ - Leptos SSR + Hydration │
│ - Dashboard, VM management │
│ - Real-time status updates │
└─────────────────┬───────────────────────────────────────────┘
│ HTTP (REST API)
┌─────────────────┼───────────────────────────────────────────┐
│ │ gxctl (CLI) │
│ │ - Interactive shell │
│ │ - Connects to console Unix socket │
└─────────────────┼───────────────────────────────────────────┘
│ HTTP / Unix Socket
┌─────────────────▼───────────────────────────────────────────┐
│ glidex-control-plane (Server) │
│ - REST API (Axum) │
│ - VM state management │
│ - Hypervisor abstraction layer │
│ - Console proxy (PTY ↔ Unix socket) │
│ - Console logging │
│ - Persistence (ReDB) │
└─────────────────┬───────────────────────────────────────────┘
│ Unix Socket (Hypervisor API)
┌─────────┴─────────┐
▼ ▼
┌───────────────┐ ┌───────────────────┐
│ Firecracker │ │ Cloud-Hypervisor │
│ - microVM │ │ - microVM │
│ - KVM-based │ │ - KVM-based │
└───────────────┘ └───────────────────┘
The control plane uses a trait-based abstraction to support multiple hypervisors:
hypervisor/
├── mod.rs # Hypervisor and HypervisorProcess traits
├── firecracker.rs # Firecracker implementation
└── cloud_hypervisor.rs # Cloud-Hypervisor implementation
Both hypervisors implement the same interface:
configure()- Configure VM with CPU, memory, kernel, and diskstart()- Boot the VMpause()- Pause the VMresume()- Resume a paused VMkill()- Terminate the VM process
For each running VM (Firecracker):
- A PTY (pseudo-terminal) pair is created
- The hypervisor's stdin/stdout/stderr connect to the PTY slave
- A background thread reads from the PTY master and:
- Writes all output to a log file (
/tmp/{hypervisor}-{id}.log) - Broadcasts to connected clients via Unix socket (
/tmp/{hypervisor}-{id}.console.sock)
- Writes all output to a log file (
- Multiple clients can connect simultaneously
For Cloud-Hypervisor, console output is captured via the --console file option.
- Linux (both hypervisors only support Linux)
- KVM enabled (
/dev/kvmaccessible) - Rust 1.85+ (for building)
- Firecracker 1.14.0+ (for Firecracker VMs)
- Cloud-Hypervisor 44.0+ (optional, for Cloud-Hypervisor VMs)
# Check if KVM is available
ls -la /dev/kvm
# Add your user to the kvm group
sudo usermod -aG kvm $USER
# Log out and back in for the change to take effectglidex/
├── Cargo.toml # Workspace root
├── install.sh # Installation script
├── README.md
└── crates/
├── glidex-control-plane/ # Control plane server
│ ├── src/
│ │ ├── main.rs # Server entry point
│ │ ├── api.rs # REST API routes and handlers
│ │ ├── models.rs # Data structures (VM, VmConfig, etc.)
│ │ ├── state.rs # VM state management
│ │ ├── persistence.rs # ReDB-based persistence
│ │ ├── hypervisor/ # Hypervisor abstraction layer
│ │ │ ├── mod.rs # Traits and HypervisorType enum
│ │ │ ├── firecracker.rs # Firecracker backend
│ │ │ └── cloud_hypervisor.rs # Cloud-Hypervisor backend
│ │ └── bin/
│ │ └── gxctl.rs # CLI client
│ └── tests/
│ └── api_tests.rs # API integration tests
└── glidex-ui/ # Web UI (Leptos)
├── src/
│ ├── main.rs # SSR server
│ ├── app.rs # Root component
│ ├── api/ # API client
│ ├── components/ # UI components
│ └── pages/ # Page views
├── style/ # Tailwind CSS
└── README.md # UI documentation
cargo testcargo buildcargo build --releaseThe installer can download official Firecracker CI images:
- Kernel: Linux kernel compiled for Firecracker
- RootFS: Ubuntu-based root filesystem (ext4)
- SSH Key: Generated key pair for VM access
Files are stored in ~/.glidex/:
~/.glidex/
├── vmlinux.bin # Linux kernel
├── rootfs.ext4 # Ubuntu root filesystem
├── vm_key # SSH private key
└── vm_key.pub # SSH public key
To SSH into a running VM (requires network configuration):
ssh -i ~/.glidex/vm_key root@<vm-ip>MIT
- Firecracker - microVM hypervisor
- Cloud-Hypervisor - microVM hypervisor
- Axum - Web framework
- Leptos - Rust web framework for the UI
- Tokio - Async runtime
- Tailwind CSS - Utility-first CSS framework