Add SMB volume driver via direct guest CIFS mount#1414
Open
tonycoco wants to merge 1 commit intoapple:mainfrom
Open
Add SMB volume driver via direct guest CIFS mount#1414tonycoco wants to merge 1 commit intoapple:mainfrom
tonycoco wants to merge 1 commit intoapple:mainfrom
Conversation
5f179cd to
afb3797
Compare
Add --driver smb to container volume create. SMB volumes store the share path and credentials as metadata with no block image. At container start, they are resolved into a cifs mount directly inside the Linux guest rather than going through virtiofs. Supported driver opts: share, username, password, domain.
afb3797 to
68ff885
Compare
vxnkjyffmq-code
approved these changes
Apr 12, 2026
4 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.
Add NFS and SMB volume drivers via direct guest mounts
Adds
--driver nfsand--driver smbtocontainer volume create. Both drivers mount network shares directly inside the Linux guest rather than going throughvirtiofs, eliminating the host-side mount hop.When a volume is created with
--driver smbor--driver nfs, no block image is created. The share path and options are stored as volume metadata. At container start,Utility.swiftresolves the volume into aFilesystem.smborFilesystem.nfsmount, whichSandboxService.swifttranslates into a.anyguest mount with typecifsornfsrespectively.Usage:
SMB
NFS
Boolean mount flags (e.g.
nolock,mfsymlinks) can be passed as--opt nolock=with an empty value and are serialized as bare flags in the mount data string.Kernel requirement
This depends on a pending change to apple/containerization. The default guest kernel ships with
CONFIG_CIFS=ydisabled. A PR to that repo is needed to enable it inkernel/config-arm64— without it, SMB mounts fail at runtime witherrno 19 (ENODEV). NFS (CONFIG_NFS_FS) is already enabled in the current kernel config but is not compiled into the shipped kernel binary, so a rebuild is required for both drivers to work end-to-end.The required containerization change is a single line in
kernel/config-arm64:Type of Change
Motivation and Context
#1413
Testing