Opened 2 years ago

Closed 2 years ago

#65852 closed defect (fixed)

podman no longer works without hvf on an M1 mac

Reported by: cluening (Cory Lueninghoener) Owned by: judaew (Vadym-Valdis Yudaiev)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: podman

Description

When trying to install podman 4.2.1 with macports on an M1 mac, starting the podman VM would fail:

s1083703:~ cdlueni$ podman machine start
Starting machine "podman-machine-default"
Waiting for VM ...
Error: qemu exited unexpectedly with exit code 1, stderr: qemu-system-aarch64: The 'host' CPU type can only be used with KVM or HVF

It looks like this error message is a result of a new change as of qemu 7.0.0, and I am getting macport's qemu 7.1.0.

Looking through the podman port's Portfile, there's a patch that disables hvf acceleration when starting qemu with a note that points to trac ticket #64131. From what I can tell, the motivation for that patch is no longer true. The macports version of qemu 7.1.0 enables hvf now:

s1083703:podman cdlueni$ qemu-system-aarch64 -accel help
Accelerators supported in QEMU binary:
hvf
tcg

And after building a local copy of the port with the hvf removal patch commented out, the podman VM was able to start correctly and I was able to run a hello-world pod.

I propose that the patch that disables hvf be removed.

Change History (5)

comment:1 Changed 2 years ago by jmroot (Joshua Root)

Owner: set to judaew
Status: newassigned

comment:2 Changed 2 years ago by Vadym-Valdis Yudaiev <judaew@…>

In 2d437badaffb33d3a3c859a45fbf361bf87870ba/macports-ports (master):

podman: Fix launching QEMU VM for arm64

See #65852

comment:3 Changed 2 years ago by cluening (Cory Lueninghoener)

The updated package works great. Thanks for the quick fix!

comment:4 Changed 2 years ago by judaew (Vadym-Valdis Yudaiev)

Thank you for your valuable feedback.

comment:5 Changed 2 years ago by judaew (Vadym-Valdis Yudaiev)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.