diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-02-18 14:07:49 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-02-26 01:05:01 +0000 |
| commit | 9377aede3157a3e7b702dc389c15f27523b673e7 (patch) | |
| tree | 9ea01493815cfb58e642b65b5b31472235b5a09a /recipes-containers/vcontainer/files/containerd-config-vxn.toml | |
| parent | fa4b171a436559787cfcebd4046a1354a1f5cacf (diff) | |
| download | meta-virtualization-9377aede3157a3e7b702dc389c15f27523b673e7.tar.gz | |
vxn: add containerd OCI runtime integration
Add shell-based OCI runtime (vxn-oci-runtime) that enables containerd
to manage Xen DomU containers through the standard runc shim. Non-terminal
container output flows back to ctr via the shim's pipe mechanism.
New files:
- vxn-oci-runtime: OCI runtime (create/start/state/kill/delete/features/logs)
- vxn-sendtty.c: SCM_RIGHTS helper for terminal mode PTY passing
- containerd-shim-vxn-v2: PATH trick wrapper for runc shim coexistence
- containerd-config-vxn.toml: CRI config (vxn default, runc fallback)
- vctr: convenience wrapper injecting --runtime io.containerd.vxn.v2
Key design:
- Monitor subprocess uses wait on xl console (not sleep-polling) for
instant reaction when domain dies, then extracts output markers and
writes to stdout (shim pipe -> containerd FIFO -> ctr client)
- cmd_state checks monitor PID liveness (not domain status) to prevent
premature cleanup race that killed monitor before output
- cmd_delete always destroys remnant domains (no --force needed)
- Coexists with runc: /usr/libexec/vxn/shim/runc symlink + PATH trick
Verified: vctr run --rm, vctr run -d, vxn standalone, vxn daemon mode.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/vcontainer/files/containerd-config-vxn.toml')
| -rw-r--r-- | recipes-containers/vcontainer/files/containerd-config-vxn.toml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/recipes-containers/vcontainer/files/containerd-config-vxn.toml b/recipes-containers/vcontainer/files/containerd-config-vxn.toml new file mode 100644 index 00000000..4dc84630 --- /dev/null +++ b/recipes-containers/vcontainer/files/containerd-config-vxn.toml | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | version = 2 | ||
| 2 | |||
| 3 | # Register vxn shim: containerd-shim-vxn-v2 (symlink to runc shim) | ||
| 4 | # with BinaryName pointing to vxn-oci-runtime. | ||
| 5 | # This allows: ctr run --runtime io.containerd.vxn.v2 ... | ||
| 6 | |||
| 7 | # CRI plugin: make vxn the default runtime for Kubernetes | ||
| 8 | [plugins."io.containerd.grpc.v1.cri".containerd] | ||
| 9 | default_runtime_name = "vxn" | ||
| 10 | |||
| 11 | [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.vxn] | ||
| 12 | runtime_type = "io.containerd.vxn.v2" | ||
| 13 | [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.vxn.options] | ||
| 14 | BinaryName = "/usr/bin/vxn-oci-runtime" | ||
| 15 | |||
| 16 | [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc] | ||
| 17 | runtime_type = "io.containerd.runc.v2" | ||
| 18 | [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options] | ||
| 19 | BinaryName = "runc" | ||
