summaryrefslogtreecommitdiffstats
path: root/recipes-kernel
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2026-02-15 04:35:55 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2026-02-26 01:05:01 +0000
commit57d267db7878180d1ecd1936df5284550d0031c3 (patch)
treeb2205ccb2e6114fdda4384518d4b9047209756ef /recipes-kernel
parent0fe8c4444f3199b862a4ba52b2b62b5f9b2af85f (diff)
downloadmeta-virtualization-57d267db7878180d1ecd1936df5284550d0031c3.tar.gz
vxn: add Xen DomU container runtime with OCI image support
vxn runs OCI containers as Xen DomU guests — the VM IS the container. No Docker/containerd runs inside the guest; the init script directly mounts the container rootfs and execs the entrypoint via chroot. Host-side (Dom0): - vxn.sh: Docker-like CLI wrapper (sets HYPERVISOR=xen) - vrunner-backend-xen.sh: Xen xl backend for vrunner - hv_prepare_container(): pulls OCI images via skopeo, resolves entrypoint from OCI config using jq on host - xl create for VM lifecycle (PVH on aarch64, PV on x86_64) - Bridge networking with iptables DNAT for port forwards - Console capture via xl console for ephemeral mode Guest-side (DomU): - vxn-init.sh: mounts container rootfs from input disk, extracts OCI layers, execs entrypoint via chroot - Supports containers with or without /bin/sh - grep/sed fallback for OCI config parsing (no jq needed) - Daemon mode with command loop on hvc1 - vcontainer-init-common.sh: hypervisor detection, head -n fix - vcontainer-preinit.sh: init selection via vcontainer.init= Build system: - vxn-initramfs-create.inc: assembles boot blobs from vruntime multiconfig, injects vxn-init.sh into rootfs squashfs - vxn_1.0.bb: Dom0 package with scripts + blobs - nostamp on install/package chain (blobs from DEPLOY_DIR are untracked by sstate) - vxn.cfg: Xen PV kernel config fragment Tested: vxn -it --no-daemon run --rm hello-world Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-kernel')
-rw-r--r--recipes-kernel/linux/linux-yocto/vxn.cfg24
1 files changed, 24 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-yocto/vxn.cfg b/recipes-kernel/linux/linux-yocto/vxn.cfg
new file mode 100644
index 00000000..932732dc
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/vxn.cfg
@@ -0,0 +1,24 @@
1# Xen PV guest support for vxn (vcontainer on Xen)
2# These configs enable a kernel to run as a Xen PV or PVHVM guest
3# with virtio-equivalent functionality via Xen paravirtualized drivers.
4
5# Core Xen guest support
6CONFIG_XEN=y
7CONFIG_XEN_PV=y
8CONFIG_XEN_PVHVM=y
9
10# Block device frontend (guest sees /dev/xvd*)
11CONFIG_XEN_BLKDEV_FRONTEND=y
12
13# Network frontend (guest sees eth0 via xennet)
14CONFIG_XEN_NETDEV_FRONTEND=y
15
16# PV console (guest sees /dev/hvc0, /dev/hvc1)
17CONFIG_HVC_XEN=y
18CONFIG_HVC_XEN_FRONTEND=y
19
20# Framebuffer frontend (not strictly required but useful)
21CONFIG_XEN_FBDEV_FRONTEND=y
22
23# 9pfs frontend for file sharing (trans=xen)
24CONFIG_XEN_9PFS_FRONTEND=y