Some checks are pending
Run Check Script / check (pull_request) Waiting to run
- Add PodmanV0Score/IotScore (adjacent-tagged serde) and PodmanV0Interpret stub - Gate virt behind kvm feature and podman-api behind podman feature - Scaffold iot-operator-v0 (kube-rs operator stub) and iot-agent-v0 (NATS KV watch) - Add PodmanV0 to InterpretName enum - Fix aarch64 cross-compilation by making kvm/podman optional features - Align async-nats across workspace, add workspace deps for tracing/toml/tracing-subscriber - Remove unused deps (serde_yaml from agent, schemars from operator) - Add Send+Sync to CredentialSource, fix &PathBuf → &Path, remove dead_code allow - Update 5 KVM example Cargo.tomls with explicit features = ["kvm"]
KVM VM Examples
Demonstrates creating VMs with various configurations using harmony's KVM module. These examples exercise the same infrastructure primitives needed for the full OKD HA cluster with OPNsense, control plane, and workers with Ceph.
Prerequisites
A working KVM/libvirt setup:
# Manjaro / Arch
sudo pacman -S qemu-full libvirt virt-install dnsmasq ebtables
sudo systemctl enable --now libvirtd
sudo usermod -aG libvirt $USER
# Log out and back in for group membership to take effect
Scenarios
| Scenario | VMs | Disks | NICs | Purpose |
|---|---|---|---|---|
alpine |
1 | 1x2G | 1 | Minimal VM, fast boot (~5s) |
ubuntu |
1 | 1x25G | 1 | Standard server setup |
worker |
1 | 3 (60G+100G+100G) | 1 | Multi-disk for Ceph OSD |
gateway |
1 | 1x10G | 2 (WAN+LAN) | Dual-NIC firewall |
ha-cluster |
7 | mixed | 1 each | Full HA: gateway + 3 CP + 3 workers |
Usage
# Deploy a scenario
cargo run -p kvm-vm-examples -- alpine
cargo run -p kvm-vm-examples -- ubuntu
cargo run -p kvm-vm-examples -- worker
cargo run -p kvm-vm-examples -- gateway
cargo run -p kvm-vm-examples -- ha-cluster
# Check status
cargo run -p kvm-vm-examples -- status alpine
# Clean up
cargo run -p kvm-vm-examples -- clean alpine
Environment variables
HARMONY_KVM_URI: libvirt URI (default:qemu:///system)HARMONY_KVM_IMAGE_DIR: where disk images and ISOs are stored