Chalybs
Deterministic virtualization for serious systems. Forged in Linux, tempered in Rust, honed on bare metal.
A Rust-based orchestrator for repeatable, deterministic virtualization on bare metal. No libvirt. No compromises.
What it does
-
NUMA-aware hugepage provisioning.
Chalybs mounts a managed
hugetlbfs, drops pagecache, requests memory compaction, and raisesnr_hugepageson the specific NUMA node where the VM's CPUs live. It verifies allocation before proceeding. On shutdown it returns node-local and global counts to zero and unmounts cleanly. -
Deterministic CPU planning.
Chalybs builds a
CpuPlanfrom host topology discovered via sysfs. vCPUs are pinned to NUMA-local host CPUs. The plan is validated during preflight — if the requested layout cannot be satisfied, startup fails duringValidate, not silently at runtime. -
VFIO isolation enforcement.
IOMMU group membership is fully inventoried before any sysfs writes. Chalybs distinguishes between groups that are exclusive to the VM, groups containing host-owned devices, and groups that are unsafe to pass through. Isolation policy runs in
audit(log only) orenforce(hard error) mode, configurable per VM. -
Asynchronous MSI/MSI-X IRQ pinning.
A worker thread is launched after QEMU spawns and polls for IRQ appearance as the guest enumerates PCI devices. Each discovered IRQ is pinned to NUMA-local VM CPUs immediately on discovery. There are no sleep timers. Auxiliary GPU audio functions are recognized and handled separately.
-
cgroup isolation.
VM vCPU threads are moved into a dedicated
vfio_vmcgroup on launch. Host processes are confined tovfio_host. The split is derived from the CPU plan and applied atomically. -
Native DDC/CI monitor input switching.
Chalybs includes a purpose-built DDC/CI engine that switches monitor inputs over I²C at the correct lifecycle moment — after IRQ pinning is complete, not at an arbitrary delay. The implementation was reverse-engineered from scratch; it does not depend on ddcutil or any external tool.
-
MQTT/Tasmota smart power control.
USB hubs for guest devices are gated behind Tasmota smart relays. Chalybs publishes
POWER ONandPOWER OFFto the configured MQTT broker at VM start and stop, preventing devices from being enumerated on the host while the guest is running. -
Looking Glass + SPICE integration.
The Looking Glass shared memory region is created deterministically with explicit ownership, NUMA-aware sizing, and crash-safe cleanup. SPICE is wired with a
virtio-serialbus andvdagentchannel. -
Deterministic QEMU command builder.
The full QEMU argument vector is assembled by a declarative builder from the config and the resolved
CpuPlan. PCIe root port allocation is deterministic and stable across reboots. Given the same config and host topology, the resulting QEMU invocation is bit-for-bit identical every time. -
QEMU CPU model autodetection.
On AMD Zen-class hosts (family
>= 0x17, including Threadripper and EPYC), Chalybs automatically selectsEPYC-v2as the QEMU CPU model. This is deterministic and based on/proc/cpuinfo— no guesswork.
Log
- Building a better machine room 2026.10.08