core: fix krunkit virtiofs configuration - #1610
Open
jasonthird wants to merge 1 commit into
Open
Conversation
Signed-off-by: Iason Malkotsis <imalkotsis@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes Lima config generation so krunkit uses a valid default mount type (virtiofs), matching the CLI’s mount-type normalization behavior and preventing Lima validation failures on krunkit.
Changes:
- Refactors mount-type selection into a helper (
resolveMountType) and treats krunkit like VZ for default mount type resolution. - Preserves mapping of SSH/SSHFS aliases to Lima’s
reverse-sshfs. - Adds regression tests for mount-type resolution across QEMU, VZ, and krunkit.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| environment/vm/lima/yaml.go | Uses a dedicated resolver for Lima mountType, defaulting krunkit to virtiofs (like VZ). |
| environment/vm/lima/yaml_test.go | Adds unit coverage for mount-type resolution behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+112
to
+116
| {name: "qemu defaults to 9p", vmType: limaconfig.QEMU, want: limaconfig.NINEP}, | ||
| {name: "vz defaults to virtiofs", vmType: limaconfig.VZ, want: limaconfig.VIRTIOFS}, | ||
| {name: "krunkit defaults to virtiofs", vmType: limaconfig.Krunkit, want: limaconfig.VIRTIOFS}, | ||
| {name: "krunkit supports explicit virtiofs", vmType: limaconfig.Krunkit, mountType: limaconfig.VIRTIOFS, want: limaconfig.VIRTIOFS}, | ||
| {name: "krunkit supports sshfs", vmType: limaconfig.Krunkit, mountType: "sshfs", want: limaconfig.REVSSHFS}, |
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.
What changed
reverse-sshfs.Why
The CLI now converts krunkit's unsupported
9pmount type tovirtiofs, but the Lima configuration generator still treated every non-VZ backend as QEMU and emitted9p. As a result, starting krunkit failed Lima validation even whenvirtiofswas requested.This change keeps the generated Lima configuration consistent with the CLI behavior added in #1609.
Impact
colima start --vm-type krunkit --mount-type virtiofsnow generates a validvirtiofsLima configuration. Existing QEMU, VZ, and SSHFS behavior is preserved.Validation
go test ./...gofmtgit diff --checkLLM usage disclosure
OpenAI Codex using GPT-5.6-sol was used to investigate the root cause, implement the focused mount-type resolver change, and generate the regression tests. The resulting diff was inspected, formatted, and validated with the full Go test suite.