diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-01-08 04:46:41 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-01-21 18:00:26 -0500 |
| commit | e26d6bf9102d8337293dcc1a99f9dd033566bab1 (patch) | |
| tree | db17c8e3041e1bad031ebb8ea68ead1761c6074f /classes | |
| parent | acdfccaae86ee2e73690b56214a06cdfb56b460d (diff) | |
| download | meta-virtualization-e26d6bf9102d8337293dcc1a99f9dd033566bab1.tar.gz | |
vcontainer: add auto-start daemon with idle timeout
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 <bruce.ashfield@gmail.com>
Diffstat (limited to 'classes')
| -rw-r--r-- | classes/container-cross-install.bbclass | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/classes/container-cross-install.bbclass b/classes/container-cross-install.bbclass index e0fc63da..8137a857 100644 --- a/classes/container-cross-install.bbclass +++ b/classes/container-cross-install.bbclass | |||
| @@ -261,6 +261,7 @@ merge_installed_bundles() { | |||
| 261 | local docker_storage="${WORKDIR}/docker-storage-$$.tar" | 261 | local docker_storage="${WORKDIR}/docker-storage-$$.tar" |
| 262 | 262 | ||
| 263 | ${VRUNNER_PATH} \ | 263 | ${VRUNNER_PATH} \ |
| 264 | --no-daemon \ | ||
| 264 | --runtime docker \ | 265 | --runtime docker \ |
| 265 | --arch ${BLOB_ARCH} \ | 266 | --arch ${BLOB_ARCH} \ |
| 266 | --blob-dir ${VDKR_BLOB_DIR} \ | 267 | --blob-dir ${VDKR_BLOB_DIR} \ |
| @@ -292,6 +293,7 @@ merge_installed_bundles() { | |||
| 292 | local podman_storage="${WORKDIR}/podman-storage-$$.tar" | 293 | local podman_storage="${WORKDIR}/podman-storage-$$.tar" |
| 293 | 294 | ||
| 294 | ${VRUNNER_PATH} \ | 295 | ${VRUNNER_PATH} \ |
| 296 | --no-daemon \ | ||
| 295 | --runtime podman \ | 297 | --runtime podman \ |
| 296 | --arch ${BLOB_ARCH} \ | 298 | --arch ${BLOB_ARCH} \ |
| 297 | --blob-dir ${VPDMN_BLOB_DIR} \ | 299 | --blob-dir ${VPDMN_BLOB_DIR} \ |
