Skip to content

core: fix krunkit virtiofs configuration - #1610

Open
jasonthird wants to merge 1 commit into
abiosoft:mainfrom
jasonthird:agent/fix-krunkit-virtiofs
Open

core: fix krunkit virtiofs configuration#1610
jasonthird wants to merge 1 commit into
abiosoft:mainfrom
jasonthird:agent/fix-krunkit-virtiofs

Conversation

@jasonthird

@jasonthird jasonthird commented Jul 28, 2026

Copy link
Copy Markdown

What changed

  • Treat krunkit like VZ when generating Lima's default mount type.
  • Keep explicit SSHFS aliases mapped to reverse-sshfs.
  • Add platform-independent regression coverage for QEMU, VZ, and krunkit mount resolution.

Why

The CLI now converts krunkit's unsupported 9p mount type to virtiofs, but the Lima configuration generator still treated every non-VZ backend as QEMU and emitted 9p. As a result, starting krunkit failed Lima validation even when virtiofs was requested.

This change keeps the generated Lima configuration consistent with the CLI behavior added in #1609.

Impact

colima start --vm-type krunkit --mount-type virtiofs now generates a valid virtiofs Lima configuration. Existing QEMU, VZ, and SSHFS behavior is preserved.

Validation

  • go test ./...
  • gofmt
  • git diff --check

LLM 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.

Signed-off-by: Iason Malkotsis <imalkotsis@gmail.com>
@jasonthird
jasonthird marked this pull request as ready for review July 28, 2026 21:25
Copilot AI review requested due to automatic review settings July 28, 2026 21:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants