-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[macos] podman machine start
on Apple M1 uses qemu with hvf which is not yet supported by qemu on aarch64
#10577
Comments
I was able to start the machine, by changing
output of
output of
Now, it looks, I found another issue: The coreos image contains (34.20210601.dev.0) podman 3.1.2 instead of 3.2.0. |
This is expected - we're waiting on a few more patches to merge upstream in Qemu for this to be supported. The Podman issue may be my fault, I'll bring it up at scrum on Monday. 3.1.2 and 3.2.0 should be able to talk to each other. We are needing to put out a Podman 3.2.1 already for another bug, so fixing this as the same time is probably not a big deal. |
stay tuned, I will have instructions for you shortly. |
A friendly reminder that this issue had no activity for 30 days. |
@baude any update? |
A friendly reminder that this issue had no activity for 30 days. |
@baude another month, and no merge? |
correct ... i have checked with Sergio but he is now on PTO. |
With the change in Docker's pricing today this feature becomes a lot more desired! It would be great to get this in the near future. Thank you |
@lpil unfortunately,we are subject to the merging of qemu patches upstream. once that is done, we will have it all set. |
@baude What's the current state of the patchset for QEMU? Is there a link to the latest discussions about them that I can follow? |
no upstream change, the submitter needs to make some changes and resubmit |
@baude circumventing the QEMU issue temporarily with updating the |
Before 3.3.1 I could start the machine with fixing the
I think it would be better running with less optimal acceleration than tell you cannot do it at all. |
FYI, I have patched and packed both qemu and podman due to this issue. You can check this out with the command below: brew install simnalamburt/x/podman-apple-silicon
# Example
podman machine init
podman machine start
podman run -p 8080:80 docker.io/nginx References |
@simnalamburt I'm working on a PR with a podman patch for the podman side of the equation. I'll include awareness of Having said that, your qemu patches look much farther along than my experiment :). I suppose we'll have to see where the slow-moving upstream review of all that is at. |
These are the patch that I used. qemu: https://github.com/simnalamburt/qemu/tree/hvf, it's based on qemu 6.1.0 |
By the way can I take a look of your podman patch? Maybe we can collaborate with it. My PR is currently at #11449 |
Hi @simnalamburt . My podman patch is in https://github.com/jonpspri/podman/tree/homebrew. I did what I could to make it backwards-compatible. I was working from head rather than 3.3.1, but I don't think that'll make much difference on a diff. Feel free to grab as much as you like and work it into your PR, since you've already started it. I'll go pull and build your qemu and re-test on my hardware. |
@simnalamburt I looked at #11449 . I think we should add looking for the BIOS image in multiple locations into that PR as well (see my tree); however, to workaround this particular issue we may wish to add a separate PR for having qemu fallback to TCG acceleration if HVF acceleration is not available. That's a one-liner I can set up in a separate PR. [Note: I created PR #11453 to address the BIOS FD issue, since it's very narrowly focused. The |
Cause qemu to fall back to using TCG acceleration when HVP acceleration is not available on Darwin Aarch64. Qemu prints a warning which it is desirable to leave to embarrass the upstream Qemu into approving the HVF patches. [NO TESTS NEEDED] Signed-off-by: Jonathan Springer <[email protected]> Signed-off-by: Jonathan Springer <[email protected]>
I believe @ashley-cui is also maintaining a Qemu build for Homebrew which includes the appropriate patches to run on M1. |
Qemu TCG Accel fallback for Apple Silicon. Iss #10577
Did you use Alexander's patch for hvf support? Looks like there is a recent update to the patch, changing how qemu would be called:
|
Yes I used that patch and podman is already using |
Cause qemu to fall back to using TCG acceleration when HVP acceleration is not available on Darwin Aarch64. Qemu prints a warning which it is desirable to leave to embarrass the upstream Qemu into approving the HVF patches. [NO TESTS NEEDED] Signed-off-by: Jonathan Springer <[email protected]> Signed-off-by: Jonathan Springer <[email protected]>
why my config file is not create when I installed podman ?
is not present |
Closing as we now have support for M1 via Homebrew's Qemu |
@ashley-cui not sure if this is in the scope of this issue, but should it be possible to run and build linux/amd64 with podman on MacOS via brew's qemu, or is this a feature possibly coming at a later date? |
Hi. I have been looking into posts for three weeks now and not one single one of thm seem to give a good solution to this issue. As far as I am concerned, there is a big issue with Podman, brew and qemu on M1 machines still. Regards, |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
podman machine start
and the otherpodman machine
commands use not supported qemu accelerator hvf on aarch64/darwin (MacOS 11.4 on M1).podman/pkg/machine/qemu/options_darwin_arm64.go adds to the invocation of qemu
--accel hvf
.The standard qemu built from brew formula did not contain hvf support, so I rebuilt qemu with configure option
--enable-hvf
which did not result in the expected outcome. Verifying the binary withqemu-system-aarch64 -accel help
states onlytcg
supported. I reviewed the qemu source, and as it looks there is no implementation of hvf for aarch64 in qemu yet.If I read it correctly the qemu code for target arm or aarch64 does not contain any calls to the Hypervisor Framework (hvf).
See https://gitlab.com/qemu-project/qemu/-/tree/master/target/i386/hvf vs https://gitlab.com/qemu-project/qemu/-/tree/master/target/arm
Steps to reproduce the issue:
Describe the results you received:
qemu reports that hvf is an invalid accelerator.
Describe the results you expected:
Machine is started with the right qemu parameters.
Additional information you deem important (e.g. issue happens only occasionally):
Issue happens every time.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Output of
brew list podman
Output of
brew info podman
Output of
brew list qemu
Output of
brew info qemu
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Hardware: Mac Mini M1 16G
ProductName: macOS
ProductVersion: 11.4
BuildVersion: 20F71
The text was updated successfully, but these errors were encountered: