qarax is a management platform for managing virtual machines with Cloud Hypervisor.
qarax consists of two main components:
- qarax (this repository): Control plane REST API server that manages VM and host lifecycle
- qarax-node: Data plane gRPC service that runs on hypervisor hosts and manages VM execution via Cloud Hypervisor
# Build all packages and generate OpenAPI spec
make build
# Generate OpenAPI spec only
make openapi
# Run tests
make test
# Or use cargo directly (won't auto-generate OpenAPI)
cargo buildThe project includes auto-generated OpenAPI 3.1 documentation. Access it at http://localhost:8000/swagger-ui when the server is running.
qarax uses bootc (bootable containers) to deploy VMM (Virtual Machine Manager) hosts. The bootc image includes qarax-node, Cloud Hypervisor, and all necessary dependencies.
Add the deployment configuration to your configuration file (configuration/base.yaml):
deployment:
mode: "direct" # or "bootc" for production
ssh_key_path: "/path/to/ssh/key"
bootc:
registry: "quay.io/yourorg"
image_name: "qarax-vmm-host"During development, use direct mode to quickly deploy qarax-node binaries:
# Build qarax-node
cargo build -p qarax-node
# Deploy to test host
scp target/debug/qarax-node root@192.168.1.100:/usr/local/bin/qarax-node
ssh root@192.168.1.100 "systemctl restart qarax-node"For production, build and deploy bootc images:
# Build release binary
cargo build --release -p qarax-node
# Build bootc image
podman build -f deployments/Containerfile.qarax-vmm -t quay.io/yourorg/qarax-vmm-host:v1.0.0 .
podman push quay.io/yourorg/qarax-vmm-host:v1.0.0
# Deploy to host via qarax API
curl -X POST http://qarax:8000/hosts/{host_id}/deploy \
-d '{"mode": "bootc", "image_version": "v1.0.0"}'See deployments/README.md for detailed information about building and deploying bootc images.