Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rancher - use vz instead of qemu on M3 macOS >=13.3 #78

Merged
merged 5 commits into from
Jan 16, 2024
Merged

Conversation

pb-dod
Copy link
Contributor

@pb-dod pb-dod commented Jan 16, 2024

Currently rancher 1.12.0 has a known issue causing m3 macs not to work with qemu:
image

@mabel-luo recently had to switch from qemu to vz manually after encountering this issue: rancher-sandbox/rancher-desktop#5943 (comment)

This PR automatically switches the development profile from qemu to vz if the user is on at least macOS 13.3 and an M3 mac.

@pb-dod pb-dod requested a review from a team as a code owner January 16, 2024 16:24
@pb-dod pb-dod changed the title rancher - use vz instead of qemu on macOS >=13.3 rancher - use vz instead of qemu on M3 macOS >=13.3 Jan 16, 2024
Comment on lines 31 to 35
if [[ "$hw_model" == *"M3"* ]]; then
return 0 # This is an M3 Mac.
else
return 1 # This is not an M3 Mac.
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

This could just be.

Suggested change
if [[ "$hw_model" == *"M3"* ]]; then
return 0 # This is an M3 Mac.
else
return 1 # This is not an M3 Mac.
fi
[[ "$hw_model" == *"M3"* ]]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah nice, fixed: 1bf73db

@@ -120,6 +133,18 @@ function ih::setup::core.rancher::install() {
fi
fi

# Use vz (requires macOS >=13.3) instead of qemu on M3 macs to resolve issues.
# More details: https://github.com/lima-vm/lima/issues/1996
if ih::arch::is_m3_mac; then
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Planning to only make this switch for m3 mac users for now, since vz is still "experimental" according to the docs. I think a few of the platform team people are going to try using it on non-M3 macs and see if it breaks anything.

@pb-dod pb-dod merged commit fd5471d into master Jan 16, 2024
@pb-dod pb-dod deleted the use_vz_m3_mac branch January 16, 2024 17:18
@pb-dod
Copy link
Contributor Author

pb-dod commented Jan 16, 2024

@mabel-luo confirmed this fix worked for her.

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