<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/meta-virtualization.git/recipes-containers/vcontainer/files/vrunner-backend-xen.sh, branch master</title>
<subtitle>Mirror of git.yoctoproject.org/meta-virtualization</subtitle>
<id>https://git.enea.com/cgit/linux/meta-virtualization.git/atom?h=master</id>
<link rel='self' href='https://git.enea.com/cgit/linux/meta-virtualization.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/'/>
<updated>2026-02-26T01:05:01+00:00</updated>
<entry>
<title>vxn: add per-container DomU lifecycle and memres persistent DomU</title>
<updated>2026-02-26T01:05:01+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-02-17T13:27:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=fa4b171a436559787cfcebd4046a1354a1f5cacf'/>
<id>urn:sha1:fa4b171a436559787cfcebd4046a1354a1f5cacf</id>
<content type='text'>
Per-container DomU lifecycle:
- run -d: per-container DomU with daemon loop and PTY-based IPC
- ps: show Running vs Exited(code) via ===STATUS=== PTY query
- exec/stop/rm: send commands to per-container DomU
- logs: retrieve entrypoint output from running DomU
- Entrypoint death detection with configurable grace period
- Graceful error messages for ~25 unsupported commands
- Command quoting fix: word-count+cut preserves internal spaces

Memres (persistent DomU for fast container dispatch):
- vxn memres start/stop/status/list for persistent DomU management
- vxn run auto-dispatches to memres via xl block-attach + RUN_CONTAINER
- Guest daemon loop handles ===RUN_CONTAINER===: mount hot-plugged
  xvdb, extract OCI rootfs, chroot exec entrypoint, unmount, report
- Falls back to ephemeral mode when memres is occupied (PING timeout)
- Xen-specific memres list shows xl domains and orphan detection

Tested: vxn memres start + vxn run --rm alpine echo hello +
vxn run --rm hello-world both produce correct output.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>vxn: fix non-interactive mode for clean container output</title>
<updated>2026-02-26T01:05:01+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-02-15T20:25:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=464503218652139d412b42ff0f00d2be2e89a698'/>
<id>urn:sha1:464503218652139d412b42ff0f00d2be2e89a698</id>
<content type='text'>
Fix several issues preventing non-interactive mode (vxn --no-daemon run)
from showing clean container output:

- Fix console capture: check DAEMON_MODE instead of DAEMON_SOCKET in Xen
  backend so ephemeral runs use xl console capture instead of the daemon
  socat bridge (DAEMON_SOCKET is always set, DAEMON_MODE is only "start"
  for actual daemon launches)
- Fix race condition: add post-loop marker detection after VM exits,
  with 2s delay for xl console to flush its buffer
- Add stdbuf -oL to xl console for line-buffered output
- Suppress mke2fs stdout (was only redirecting stderr)
- Suppress kernel console messages during VM lifecycle in non-verbose mode
- Fix grep -P (Perl regex) for BusyBox compatibility in exit code parsing
- Preserve temp directory on failure for debugging
- Fix hardcoded "QEMU" in error messages to "VM"

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>vxn: add Xen DomU container runtime with OCI image support</title>
<updated>2026-02-26T01:05:01+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-02-15T04:35:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=57d267db7878180d1ecd1936df5284550d0031c3'/>
<id>urn:sha1:57d267db7878180d1ecd1936df5284550d0031c3</id>
<content type='text'>
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 &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
</feed>
