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

Fix M1 QEMU flags #14563

Merged
merged 1 commit into from
Jun 13, 2022
Merged

Fix M1 QEMU flags #14563

merged 1 commit into from
Jun 13, 2022

Conversation

ashley-cui
Copy link
Member

When calling QEMU, the CPU arch should be host, and highmem should be on, or else the VM start fails.

[NO NEW TESTS NEEDED]

Signed-off-by: Ashley Cui [email protected]

Fixes: #14303

Does this PR introduce a user-facing change?

Fixed a bug where podman machine fails to start with memory > 3072 on M1

When calling QEMU, the CPU arch should be host, and highmem should be on, or else the VM start fails.

[NO NEW TESTS NEEDED]

Signed-off-by: Ashley Cui <[email protected]>
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 10, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ashley-cui

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 10, 2022
@ashley-cui
Copy link
Member Author

@baude PTAL, should now work with qemu 7.0.0 and with -m > 3072

@shanesmith
Copy link
Contributor

⚠️ While it seems to work well on macOS 12.4, this causes a kernel panic and crashes macOS on version 12.3! I've not been able to investigate any further, however...

@TomSweeneyRedHat
Copy link
Member

Changes LGTM, but @shanesmith 's comment looks très effrayant

@ashley-cui
Copy link
Member Author

@shanesmith Interesting, i tried in 12.2 and 12.4 and they both work, looks like its just a 12.3 issue..

@shanesmith
Copy link
Contributor

qemu are aware of this issue and are saying that it's a macOS bug in 12.3, they also seem to be happy with 12.4 resolving the issue, no mention of fixing things for 12.3.... this leaves Podman in a bit of a pickle though 😅

@shanesmith
Copy link
Contributor

Here's how Lima has handled it, fwiw

@rhatdan
Copy link
Member

rhatdan commented Jun 13, 2022

LGTM
I think we should just merge and deal with the 12.3 issue in a later PR.
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 13, 2022
@openshift-ci openshift-ci bot merged commit 9fac1b3 into containers:main Jun 13, 2022
@shanesmith
Copy link
Contributor

As mentioned in #14303, the issue seems to be specifically with macOS 12.3 and the Apple M1 Pro chip.

@arthurbarr
Copy link

FWIW, I also see macOS crashing when doing podman machine start on macOS 12.1.

@cpolizzi
Copy link

@shanesmith @baude @ashley-cui I can now confirm that this fix of -cpu host and -M virt,himem=on and with memory sizing greater than 3GB does NOT crash an M1 MacBook Pro Max on macOS 12.4. Just got it tested. BTW, on Intel we use the -machine option instead of its short hand that we use on M1 of -M. Any reason for that? My customer base will be upgrading to 12.4 over the coming couple of weeks.

@maxclax
Copy link

maxclax commented Oct 12, 2022

I also see macOS crashing when doing podman machine start on macOS 12.6
==> qemu: stable 7.1.0 (bottled), HEAD
==> podman: stable 4.2.1 (bottled), HEAD

@shanesmith
Copy link
Contributor

Could not reproduce, I have the same uname and podman version as @idubrovin

It seems these issues were also dependent on the chip, so for what it's worth I have a MacBook Pro (14-inch, 2021) which has an Apple M1 Pro chip.

@idubrovin
Copy link

Could not reproduce, I have the same uname and podman version as @idubrovin

It seems these issues were also dependent on the chip, so for what it's worth I have a MacBook Pro (14-inch, 2021) which has an Apple M1 Pro chip.

Thanks, I reinstalled qemu by brew, deleted vm, reinited it and problem is gone!
🫶

@maxclax
Copy link

maxclax commented Oct 13, 2022

That not after podman machine start that when you work and docker stop $(docker ps -a -q) ; docker rm $(docker ps -a -q); that freeze my cursor and my mac start thinking a long time and next automatically reboot. but this does not always happen, intermittently i can't figure out the reason

MacBook Pro (13-inch, M1, 2020)

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot start machine with podman version 4.1.0 in M1 Mac
8 participants