<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/meta-virtualization.git/recipes-containers/vcontainer/files/vcontainer-init-common.sh, branch container-cross-install</title>
<subtitle>Mirror of git.yoctoproject.org/meta-virtualization</subtitle>
<id>https://git.enea.com/cgit/linux/meta-virtualization.git/atom?h=container-cross-install</id>
<link rel='self' href='https://git.enea.com/cgit/linux/meta-virtualization.git/atom?h=container-cross-install'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/'/>
<updated>2026-01-24T20:53:26+00:00</updated>
<entry>
<title>vcontainer: add host-side idle timeout with QMP shutdown</title>
<updated>2026-01-24T20:53:26+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-01-24T03:22:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=8f7f2089a528e0d1d39e5f65ae3728ac6b8e56cd'/>
<id>urn:sha1:8f7f2089a528e0d1d39e5f65ae3728ac6b8e56cd</id>
<content type='text'>
Implement reliable idle timeout for vmemres daemon mode using
host-side monitoring with QMP-based shutdown, and container-aware
idle detection via virtio-9p shared file.

Host-side changes (vrunner.sh):
  - Add -no-reboot flag to QEMU for clean exit semantics
  - Spawn background watchdog when daemon starts
  - Watchdog monitors activity file timestamp
  - Check interval scales to idle timeout (timeout/5, clamped 10-60s)
  - Read container status from shared file (guest writes via virtio-9p)
  - Only shutdown if no containers are running
  - Send QMP "quit" command for graceful shutdown
  - Watchdog auto-exits if QEMU dies (no zombie processes)
  - Touch activity file in daemon_send() for user activity tracking

Config changes (vcontainer-common.sh):
  - Add idle-timeout to build_runner_args() so it's always passed

Guest-side changes (vcontainer-init-common.sh):
  - Add watchdog that writes container status to /mnt/share/.containers_running
  - Host reads this file instead of socket commands (avoids output corruption)
  - Close inherited virtio-serial fd 3 in watchdog subshell to prevent leaks
  - Guest-side shutdown logic preserved but disabled (QMP more reliable)
  - Handle Yocto read-only-rootfs volatile directories (/var/volatile)

The shared file approach avoids sending container check commands through
the daemon socket, which previously caused output corruption on the
single-stream virtio-serial channel.

The idle timeout is configurable via: vdkr vconfig idle-timeout &lt;secs&gt;
Default: 1800 seconds (30 minutes)

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>vcontainer: add virtio-9p fast path for batch imports</title>
<updated>2026-01-21T23:00:26+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-01-15T21:50:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=92a34f0187fad2b6ab3dd60b722a53d70a090e16'/>
<id>urn:sha1:92a34f0187fad2b6ab3dd60b722a53d70a090e16</id>
<content type='text'>
Add virtio-9p filesystem support for faster storage output during batch
container imports, replacing slow base64-over-console method.

- Add --timeout option for configurable import timeouts
- Mount virtio-9p share in batch-import mode
- Parse _9p=1 kernel parameter for 9p availability
- Write storage.tar directly to shared filesystem
- Reduces import time from ~600s to ~11s for large containers

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>vdkr: add registry configuration and pull fallback</title>
<updated>2026-01-21T23:00:26+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-01-12T16:13:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=65cebeda3a2eda72802a46949601ba3e021a0db6'/>
<id>urn:sha1:65cebeda3a2eda72802a46949601ba3e021a0db6</id>
<content type='text'>
Add registry support to vdkr:
- vconfig registry command for persistent config
- --registry flag for one-off usage
- Registry-first, Docker Hub fallback for pulls
- Baked-in registry config via CONTAINER_REGISTRY_URL
- Image commands (inspect, history, rmi, images) work without transform

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>vcontainer-init: fix idle timeout detection to distinguish EOF from timeout</title>
<updated>2026-01-21T23:00:26+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-01-08T14:12:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=ac6ea03ec5c944a4edaf602d8211c75446217d6f'/>
<id>urn:sha1:ac6ea03ec5c944a4edaf602d8211c75446217d6f</id>
<content type='text'>
The read -t command returns different exit codes:
- 0: successful read
- 1: EOF (connection closed)
- &gt;128: timeout (typically 142)

Previously, any empty result was treated as timeout, but when the host
closes the connection after PING/PONG, read returns EOF immediately.
This caused the daemon to shut down right after startup.

Now we capture the exit code and only trigger idle shutdown when
read actually times out (exit code &gt; 128).

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>vcontainer: add auto-start daemon with idle timeout</title>
<updated>2026-01-21T23:00:26+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-01-08T04:46:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=e26d6bf9102d8337293dcc1a99f9dd033566bab1'/>
<id>urn:sha1:e26d6bf9102d8337293dcc1a99f9dd033566bab1</id>
<content type='text'>
Add automatic daemon startup and idle timeout cleanup for vdkr/vpdmn:

- vmemres daemon auto-starts on first command (no manual start needed)
- Daemon auto-stops after idle timeout (default: 30 minutes)
- --no-daemon flag for ephemeral mode (single-shot QEMU)
- New config keys: idle-timeout, auto-daemon

Changes:
- vcontainer-init-common.sh: Parse idle_timeout from cmdline, add
  read -t timeout to daemon loop for auto-shutdown
- vrunner.sh: Add --idle-timeout option, pass to kernel cmdline
- vcontainer-common.sh: Auto-start logic in run_runtime_command(),
  --no-daemon flag, config defaults
- container-cross-install.bbclass: Add --no-daemon for explicit
  ephemeral mode during Yocto builds

Configuration:
  vdkr vconfig idle-timeout 3600    # 1 hour timeout
  vdkr vconfig auto-daemon false    # Disable auto-start

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>vcontainer: add shared infrastructure and runner</title>
<updated>2026-01-21T23:00:26+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-01-06T20:41:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=de7407165c03b5703409638c717553febeacdced'/>
<id>urn:sha1:de7407165c03b5703409638c717553febeacdced</id>
<content type='text'>
Add core vcontainer infrastructure shared by vdkr and vpdmn:

Scripts:
- vrunner.sh: QEMU runner supporting both Docker and Podman runtimes
- vcontainer-common.sh: Shared CLI functions and command handling
- vcontainer-init-common.sh: Shared init script functions for QEMU guest
- vdkr-preinit.sh: Initramfs preinit for switch_root to squashfs overlay

Recipes:
- vcontainer-native: Installs vrunner.sh and shared scripts
- vcontainer-initramfs-create.inc: Shared initramfs build logic

Features:
- Docker/Podman-compatible commands: images, pull, load, save, run, exec
- Memory resident mode for fast command execution
- KVM acceleration when host matches target
- Interactive mode with volume mounts
- Squashfs rootfs with tmpfs overlay

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
</feed>
