Skip to content

OCI Improvements#8

Merged
dpsoft merged 8 commits intomainfrom
feat/open-claw-demo
Feb 26, 2026
Merged

OCI Improvements#8
dpsoft merged 8 commits intomainfrom
feat/open-claw-demo

Conversation

@dpsoft
Copy link
Copy Markdown
Contributor

@dpsoft dpsoft commented Feb 26, 2026

This pull request introduces significant improvements to the documentation and build/test workflow for VoidBox, especially around guest image creation, OCI rootfs handling, and conformance validation. The changes clarify platform-specific requirements, document the differences between guest image scripts, and add a comprehensive operations guide for running and validating VM/OCI/OpenClaw workflows. Additionally, the README and CONTRIBUTING guides are updated for better clarity and coverage, and a new dependency is added for OCI disk cache key hashing.

Documentation and Operations Guide Enhancements:

  • Added a new docs/AGENT.md file providing an in-depth operational reference for running VoidBox with OCI images, including detailed explanations of the OCI root switch process, platform-specific behaviors (Linux/KVM vs. macOS/VZ), security strategies, test matrix, validation contract, and proper usage of guest image build scripts.
  • Expanded the CONTRIBUTING.md with platform-specific prerequisites, detailed instructions for building different guest images (build_guest_image.sh, build_claude_rootfs.sh, build_test_image.sh), and a matrix of when to use each. Also, the test section now covers both Linux and macOS flows, and clarifies the requirements for running VM/OCI/conformance suites. [1] [2] [3]
  • Updated the README.md to clarify the differences between guest image scripts, explain platform-specific OCI rootfs mounting (virtio-blk vs. virtiofs), and provide explicit instructions for production vs. test image usage—especially for OpenClaw gateway validation. Added references to new documentation and OpenClaw examples. [1] [2] [3] [4] [5]

Build and CI Workflow Improvements:

  • Modified the guest image build step in .github/workflows/guest-image.yml to use build_claude_rootfs.sh with the CLAUDE_CODE_VERSION variable, ensuring the correct native binary is included for production images.

Dependency Updates:

  • Added the sha2 crate to Cargo.toml for stable hashing of OCI disk cache keys, supporting robust caching of extracted OCI rootfs artifacts.

General Maintenance:

  • Removed outdated or redundant items from the CONTRIBUTING.md roadmap, such as aarch64 and Windows/macOS support checkboxes, to reflect the current project focus.

- Added a read-only 'virtio-blk' implementation for presenting OCI rootfs as a block device ('/dev/vda') on Linux/KVM.
- Refined 9pfs 'Twalk' syscall behavior to handle symlink resolution securely and enforce container-root semantics for paths.
- Implemented 'Tstatfs' syscall for 9pfs to provide filesystem statistics.
- Updated documentation to reflect 'virtio-blk' architecture changes and fallback behaviors.
- Expanded kernel module support in guest-specific scripts, including virtio-blk and additional 9p modules.
@dpsoft dpsoft changed the title Introduce minimal virtio-blk support and improve 9pfs handling OCI Improvements Feb 26, 2026
- Removed component-overview.excalidraw from the documentation. This diagram is no longer relevant or required.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces significant improvements to OCI rootfs handling in VoidBox, particularly for Linux/KVM platforms. The key change is adding support for using cached ext4 disk artifacts (attached as virtio-blk devices) for OCI base rootfs on Linux/KVM, while preserving the existing 9p/virtiofs mechanisms for skills and host mounts on both platforms.

Changes:

  • Adds virtio-blk device implementation for OCI rootfs on Linux/KVM (/dev/vda in guest)
  • Refactors OCI unpack to handle xattrs, special filesystem nodes, and hardlink fallbacks
  • Implements disk caching and build infrastructure for ext4 artifacts
  • Updates guest-agent to support block device mounting and improved pivot_root flow
  • Adds comprehensive error context throughout OCI operations
  • Updates documentation and test workflows for the new architecture

Reviewed changes

Copilot reviewed 31 out of 33 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
voidbox-oci/src/unpack.rs Hardens OCI extraction with xattr/special-node handling, hardlink fallback, improved error messages
voidbox-oci/src/lib.rs Adds error context wrapping for pull/unpack/mark operations
src/devices/virtio_blk.rs New read-only virtio-blk MMIO device for OCI rootfs disk artifacts (400 lines)
src/devices/virtio_9p.rs Adds symlink resolution, xattrwalk, statfs, and readlink support
src/devices/virtio_vsock*.rs Implements timeout_secs=0 for service mode (no timeout)
src/vmm/mod.rs Integrates virtio-blk device creation and MMIO registration
src/vmm/cpu.rs Refactors IRQ injection, restricts device polling to vCPU0, adds edge-triggered tracking
src/vmm/config.rs Adds oci_rootfs_dev and oci_rootfs_disk config fields with kernel cmdline generation
src/vmm/boot.rs Improves initramfs placement with initrd_addr_max and early identity map constraints
src/runtime.rs Implements OCI disk building/caching, platform-specific rootfs plan logic
guest-agent/src/main.rs Major refactor: deferred OCI setup, block device mounting, improved pivot_root with switch-root fallback, enhanced error diagnostics
tests/oci_integration.rs Adds block device tests, implements test disk building helper, updates paths for post-pivot execution
docs/*.md Updates architecture documentation for platform-specific OCI transport
examples/openclaw/*.yaml New OpenClaw smoke test and Telegram gateway workflows

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…alidation pipeline

- Removed `examples/openclaw/openclaw_install_smoke.yaml`, as OpenClaw validation has been migrated to a new workflow.
- Updated KVM tests to use shared `vm_preflight` module for better modularity and gate checks.
- Simplified artifact validation logic in tests to defer to `vm_preflight`.
- Refined error handling in various modules to improve clarity during validation skips/errors.
…peration

- Replaced `Mutex<&str>` OCI setup status tracking with `AtomicU8` for improved concurrency and panic safety.
- Introduced descriptive status codes and an `oci_status_str` function for converting codes to human-readable states.
- Updated codebase to use atomic operations for setting and querying OCI setup state across threads.
- Enhanced status-handling logic in runtime methods and error reporting paths.
- Added documentation for debugging EPERM issues during OCI layer unpack in `AGENT.md`.
- Expanded `stable_cache_key` function to use SHA256 for OCI disk cache keys and reduced minimum disk size in `build_oci_rootfs_disk`.
- Increased symlink follow limit in 9pfs Twalk resolution to 20 for better compatibility with container filesystems.
…mentation

- Introduced `openclaw_telegram_ollama.yaml` for running OpenClaw as a Telegram gateway with Ollama as the model backend.
- Updated `AGENT.md` and `README.md` to provide instructions and environment prerequisites for the Ollama workflow.
- Added production and validation scripts for the new gateway configuration.
- Enhanced troubleshooting and monitoring sections to include Ollama-specific steps.
- Expanded example workflows in `examples/README.md` to include the new Ollama integration.
- Added platform-specific details for OCI rootfs delivery, including macOS's virtiofs and Linux's virtio-blk approaches, in `AGENT.md`.
- Updated defense-in-depth section to cover platform-specific read-only mechanisms for OCI rootfs.
- Refined VZ backend comments to reflect virtiofs strategy for macOS.
- Minor code cleanup with `#[allow(dead_code]` annotations in non-Linux test helpers.
@dpsoft dpsoft marked this pull request as ready for review February 26, 2026 21:43
@dpsoft dpsoft merged commit 7b88ba7 into main Feb 26, 2026
14 checks passed
@dpsoft dpsoft deleted the feat/open-claw-demo branch February 26, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants