Runtime testing in a VM

Boot the built kernel in QEMU and runtime-test the modules.

The build box (and this container) can't insmod the v7.3 modules into their own running kernel, but we can boot the built kernel in QEMU and load the modules there. scripts/vm-test.sh automates it end to end — no root required (QEMU is fetched with apt-get download and run from a user-local prefix; KVM is used if /dev/kvm is accessible, otherwise TCG).

scripts/vm-test.sh                 # pulls bzImage+modules from the build box, boots, runs tests
REMOTE=root@host scripts/vm-test.sh

1What it checks (scripts/vm-init.sh, run as the VM init)

  1. insmod voltron.ko — version, default_mode, sysfs tree, css-offline reaper.
  2. Cluster node table (add_node, nodes/<id>/...).
  3. Per-cgroup policy (add_cgroup, set mode/psi_threshold, read back).
  4. Decisions intake (decisions/request → log/count).
  5. Load collector (load/local, load/score).
  6. Livepatch voltron_cgroup_lp.ko → /sys/fs/cgroup/<cg>/voltron.policy (shared store: write via cgroupfs, read back the record).
  7. SoftRoCE: rdma_rxe + rdma link add rxe0 + cluster/rdma_listen.

2Results (v7.3, confirmed)

All of the above pass. Notable things this runtime testing caught/validated:

3Two-node & migration (agent + CRIU) runs

A glibc-capable initramfs (QEMU + rdma/ip/voltron-agent/criu fetched via apt-get download, run from a user prefix) enables richer tests. Init scripts: scripts/vm-init-criu.sh (single VM) and scripts/vm-init-2node.sh (two VMs via QEMU -netdev socket).

Single VM (vm-init-criu.sh) — agent + CRIU on real v7.3

Two VMs (vm-init-2node.sh) — cross-node pinning + RDMA

Nodes linked with QEMU -netdev socket (no root/bridge needed); SoftRoCE on each.

4Limitations