additionalDisks: support custom mountPoint and optional mounting#5198
Open
ekalinin wants to merge 1 commit into
Open
additionalDisks: support custom mountPoint and optional mounting#5198ekalinin wants to merge 1 commit into
ekalinin wants to merge 1 commit into
Conversation
Additional disks were always mounted at the hardcoded path /mnt/lima-<name>, with no way to change that location or to attach a disk without Lima mounting it. Issue lima-vm#4065 asks for both: a custom mount point and an attach-only mode so the guest can manage the disk itself (a flexibility Colima can benefit from). Add two optional, backwards-compatible fields to each additionalDisks entry: - mountPoint: absolute guest path to mount at (default /mnt/lima-<name>) - mount: whether Lima auto-mounts the disk (default true; false attaches the disk without mounting it) A separate `mount` boolean is used rather than overloading an empty mountPoint, per the discussion in lima-vm#4065. nil for either field preserves the current behavior. Values are passed to the guest via LIMA_CIDATA_DISK_<i>_MOUNT / _MOUNTPOINT and honored by 05-lima-disks.sh (non-swap disks only). mountPoint is validated to be an absolute guest path (path.IsAbs, not the host-dependent filepath.IsAbs) and not a critical system path. Fixes lima-vm#4065 Signed-off-by: Eugene Kalinin <e.v.kalinin@gmail.com>
ekalinin
force-pushed
the
feat-4065-disk-mountpoint
branch
from
July 7, 2026 11:15
6f86982 to
8e928f8
Compare
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.
Additional disks were always mounted at the hardcoded path
/mnt/lima-<name>, with no way to change that location or to attach a disk without Lima mounting it. Issue #4065 asks for both: a custom mount point and an attach-only mode so the guest can manage the disk itself (a flexibility Colima can benefit from).Add two optional, backwards-compatible fields to each
additionalDisksentry:mountPoint: absolute guest path to mount at (default/mnt/lima-<name>)mount: whether Lima auto-mounts the disk (defaulttrue; false attaches the disk without mounting it)A separate
mountboolean is used rather than overloading an empty mountPoint, per the discussion in #4065.nilfor either field preserves the current behavior. Values are passed to the guest viaLIMA_CIDATA_DISK_<i>_MOUNT / _MOUNTPOINTand honored by05-lima-disks.sh(non-swap disks only).mountPointis validated to be an absolute guest path (path.IsAbs, not the host-dependentfilepath.IsAbs) and not a critical system path.Fixes #4065