How xilinx/runx works
Project Type & Purpose
• RunX is an OCI Runtime Spec–compliant container runtime.
• It lives in Dom0, is invoked by containerd, and creates Xen VMs for isolation.
• It supplies a minimal Linux kernel + BusyBox initrd, or accepts a user-supplied kernel/initrd.
File Structure
Top-level entries:
• build.sh, gobuild/Makefile + src/serial_fd_handler.go → build tooling for the Go “RunX” binary
• files/ (start, delete, serial_bridge, serial_start, state) → shell scripts that orchestrate VM lifecycle
• kernel/ (make-*, init-initrd, cutdown-config.*, patches/) → kernel build & customized initrd generation
• runX → the compiled runtime binary
Indicators of architecture:
• A clear Dom0 component (runX + support scripts)
• Kernel toolchain under kernel/
• No in-VM agent: all logic lives in Dom0
Pull Insights from the README
• Notes on CNI-based networking, passed via NETCONF env var
• Runtime hooks, no side-channel or in-VM agent
a. Main Components
1. Host / Dom0
• containerd (OCI runtime client)
• RunX binary & support scripts
• xl (Xen CLI)
• CNI plugin (bridge, ipam)
2. Xen Hypervisor
3. VM / DomU per container
• Tiny Linux Kernel (custom configs from kernel/)
• Initrd (BusyBox)
• Container rootfs (from OCI image)
b. Relationships & Interactions
• containerd → invokes RunX (via OCI runtime API)
• RunX → calls xl to create/boot VM
• xl → loads Tiny Kernel + initrd → boots VM
• VM mounts container’s rootfs
• CNI plugin config passed as NETCONF → network namespace config in Dom0 and DomU
c. Architectural Patterns & Principles
• Single-responsibility: RunX handles lifecycle, kernel building delegated to kernel/ scripts
• Micro-VM per container: strict isolation, minimal attack surface
• No in-VM agent: one-way control from Dom0
d. Key Technologies & Libraries
• Go (RunX binary via gobuild)
• Bash scripts (files/)
• Xen hypervisor (xl CLI)
• BusyBox (initrd)
• Kernel toolchain (custom configs + patches)
• CNI v2.0 for networking
Capturing Essential Elements
• Be explicit about each module under kernel/ (config generation, patches)
• Build step (gobuild/Makefile) feeding into runX
• How container rootfs is mounted in the VM