feat(sandbox): support rootfs tar as --from source for VM driver - #2863
Open
feloy wants to merge 1 commit into
Open
feat(sandbox): support rootfs tar as --from source for VM driver#2863feloy wants to merge 1 commit into
feloy wants to merge 1 commit into
Conversation
Accept flat rootfs tar archives (.tar, .tar.gz, .tgz) via the --from flag for VM-backed gateways. The CLI detects the archive extension, validates that the gateway uses the VM compute driver, and passes the tar path through driver_config. The VM driver copies the tar into its staging area and feeds it into the existing rootfs extraction and ext4 disk creation pipeline, skipping the container image pull/export steps. Closes NVIDIA#2175 Signed-off-by: Philippe Martin <phmartin@redhat.com>
feloy
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
August 21, 2026 07:14
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.tar,.tar.gz,.tgz) as a new--fromsource for VM-driver sandboxes, enabling daemon-free sandbox creation from flat filesystem archives produced bydocker export,podman export, orbuildah mount+tardriver_configRelated Issue
Closes #2175
Changes
CLI (
crates/openshell-cli/)ResolvedSource::RootfsTarvariant inresolve_from()with extension-based detectionvalidate_rootfs_tar_source()checks local-gateway and VM-driver constraints viaGetGatewayInfoRPCrootfs_tar_driver_config()andmerge_driver_config()encode the tar path intodriver_config--fromhelp text and error messagesVM driver (
crates/openshell-driver-vm/)rootfs_tar_pathfield onVmSandboxDriverConfigensure_prepared_rootfs_tar_disk()with double-checked cache locking and mtime-based identityvalidate_sandbox(),create_sandbox(),prepare_runtime_images(), and reconciliation to accept rootfs tar as an alternative to image referencesbootstrap_image_ref_default()for reuse in rootfs tar and reconciliation pathsDocs (
docs/sandboxes/manage-sandboxes.mdx)--fromdocumentation with rootfs tar example and VM-driver constraintTests
run.rs: extension detection for.tar/.tar.gz/.tgz, missing archive rejection,filename_looks_like_rootfs_tarcoveragee2e/rust/tests/rootfs_tar.rs): builds a Docker image, exports a flat rootfs tar, creates a VM sandbox from it, and verifies a marker fileTesting
mise run pre-commitpassesChecklist
driver_configcarries the tar path)