Repository navigation
Conversation
malensek
marked this pull request as ready for review
October 26, 2026 23:01
malensek
force-pushed
the
fix-rosetta-detection
branch
from
October 27, 2026 05:38
5fc2755 to
442281a
Compare
Previously, Colima checked for the presence of Rosetta with `pgrep oahd` for the `VZ` VM type. However, this check can falsely report that Rosetta is not available: * `oahd` may not be running if a GUI login has not occurred yet. * On macOS 27, Linux translation is integrated into the OS and does not require Rosetta to be installed beforehand. This change queries VZLinuxRosettaDirectoryShare.availability via `osascript`, which is essentially the same check Lima does upstream. If the check fails or Rosetta is not supported by the host, the Rosetta option is enabled so that the final check is deferred to Lima. Signed-off-by: Matthew Malensek <malensek@stanford.edu>
malensek
force-pushed
the
fix-rosetta-detection
branch
from
October 27, 2026 05:40
442281a to
487fcfa
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.
Previously (see issue #1069), Colima checked for the presence of Rosetta with
pgrep oahdfor the VZ VM type. However, this check can falsely report that Rosetta is not available:oahdmay not be running if a GUI login has not occurred yet.In both cases, Colima outputs "Rosetta2 is not installed" and falls back to QEMU, even though the VZ VM would work and be supported by Lima.
Fix
This change adds a helper,
RosettaLinuxInstalled()inutil/macos.gothat queries VZLinuxRosettaDirectoryShare.availability viaosascript, which is essentially the same check Lima does upstream (seepkg/driver/vz/rosetta_directory_share_arm64.go). My feeling is that since Colima is not using cgo, it is a better approach to shell this out toosascriptlike some of the other platform checks already do. If the check fails or Rosetta is not supported by the host, the Rosetta option is enabled so that the final check can be deferred to Lima.Testing