Add SMB volume driver via direct guest CIFS mount - #1414
Closed
tonycoco wants to merge 1 commit into
Closed
Conversation
tonycoco
force-pushed
the
feature/smb-volume-driver
branch
2 times, most recently
from
April 12, 2026 16:22
afb3797 to
68ff885
Compare
tonycoco
marked this pull request as ready for review
April 12, 2026 16:29
vxnkjyffmq-code
approved these changes
Apr 12, 2026
4 tasks
tonycoco
force-pushed
the
feature/smb-volume-driver
branch
from
April 14, 2026 16:29
2800587 to
c854d86
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.
tonycoco
force-pushed
the
feature/smb-volume-driver
branch
from
April 14, 2026 16:34
a2d6677 to
b7498f3
Compare
vxnkjyffmq-code
approved these changes
Apr 15, 2026
dcantah
pushed a commit
to apple/containerization
that referenced
this pull request
May 3, 2026
## Summary Enables CIFS (SMB) filesystem support in the arm64 kernel config, required for the SMB volume driver added in apple/container#1414. Without this change, SMB mounts fail at runtime with `errno 19 (ENODEV)`. ## Changes - `kernel/config-arm64`: enable `CONFIG_CIFS=y` and related options (`CIFS_ALLOW_INSECURE_LEGACY`, `CIFS_UPCALL`, `CIFS_XATTR`, `CIFS_POSIX`, `CIFS_DFS_UPCALL`)
simone-panico
pushed a commit
to simone-panico/containerization
that referenced
this pull request
May 19, 2026
## Summary Enables CIFS (SMB) filesystem support in the arm64 kernel config, required for the SMB volume driver added in apple/container#1414. Without this change, SMB mounts fail at runtime with `errno 19 (ENODEV)`. ## Changes - `kernel/config-arm64`: enable `CONFIG_CIFS=y` and related options (`CIFS_ALLOW_INSECURE_LEGACY`, `CIFS_UPCALL`, `CIFS_XATTR`, `CIFS_POSIX`, `CIFS_DFS_UPCALL`)
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