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/vctr | |
| 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/vctr')
| -rw-r--r-- | recipes-containers/vcontainer/files/vctr | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/recipes-containers/vcontainer/files/vctr b/recipes-containers/vcontainer/files/vctr new file mode 100644 index 00000000..ca84644a --- /dev/null +++ b/recipes-containers/vcontainer/files/vctr | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # vctr - convenience wrapper for ctr with vxn runtime | ||
| 3 | # Usage: vctr run <image> <cmd> (same as: ctr run --runtime io.containerd.vxn.v2 ...) | ||
| 4 | # vctr <any ctr command> (passed through to ctr) | ||
| 5 | |||
| 6 | VXN_RUNTIME="io.containerd.vxn.v2" | ||
| 7 | |||
| 8 | case "$1" in | ||
| 9 | run) | ||
| 10 | shift | ||
| 11 | exec ctr run --runtime "$VXN_RUNTIME" "$@" | ||
| 12 | ;; | ||
| 13 | *) | ||
| 14 | exec ctr "$@" | ||
| 15 | ;; | ||
| 16 | esac | ||
