core: fix krunkit virtiofs configuration - #1610
Conversation
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.
|
Thanks :) Kindly sign the DCO, you can check here for instructions. |
|
@jasonthird It would be great if it were included in the next release. |
Signed-off-by: Iason Malkotsis <imalkotsis@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Iason Malkotsis <imalkotsis@gmail.com>
e0aadbd to
80c9bcb
Compare
Thanks! I’ve signed off the commits and the DCO check is now passing. |
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.