feat: Add Linux support for Lima VM#648
Conversation
- Add Linux to supported OS list for Lima VM manager in trellis.go - Add VMType field to Instance struct (vz for macOS, qemu for Linux) - Update config.yml template with conditional logic for OS-specific settings: - macOS: vmType=vz, mountType=virtiofs, vzNAT networking - Linux: vmType=qemu, mountType=9p, user-v2 networking - Update ensureRequirements() to skip macOS version check on Linux - Fix IP() function to handle Linux QEMU networking (different interface names) - Fix version parsing in lima.go to handle Linux distro packages that output git hashes instead of semver versions - Update tests to be OS-aware Tested on Linux with Lima installed via distro package manager. VM successfully starts with QEMU, project directory mounts via 9p, and SSH/IP detection works correctly.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da49a43fd8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if len(v) < 2 { | ||
| return nil |
There was a problem hiding this comment.
Preserve minimum-version enforcement on unparseable limactl output
Returning success when no semantic version is matched disables the >= 0.15.0 guard entirely for any nonstandard limactl -v output, so unsupported/older builds can pass requirements and then fail later with harder-to-diagnose runtime/config errors. This path should fail closed (or use a stronger fallback parser) rather than silently bypassing version validation.
Useful? React with 👍 / 👎.
|
@superdav42 Thanks for the PR — can you update the settings so that maintainers can make edits? I think it's a setting on the PR sidebar for you? |
Summary
This PR adds Linux support for the
trellis vmcommands using Lima with QEMU.Changes
VMTypefield to Instance struct (vzfor macOS,qemufor Linux)config.ymltemplate with conditional logic for OS-specific settings:ensureRequirements()to skip macOS version check on LinuxIP()function to handle Linux QEMU networking (different interface names)Testing
Tested on Linux (Ubuntu/Arch) with Lima installed via distro package manager:
Notes
Lima supports Linux via QEMU (see lima-vm.io). This PR enables trellis-cli to use Lima on Linux systems, providing a consistent VM-based development experience across macOS and Linux.