Skip to content

podman machine start stuck "Waiting for VM" indefinitely with qemu synchronous exception MacOS M3 #20776

@peter-crist

Description

@peter-crist

Issue Description

With a fresh install via homebrew, I cannot start a machine and it hangs indefinitely at Waiting for VM. Running with debug shows that qemu hits a Synchronous Exeception at 0x00000000BC308000.

Steps to reproduce the issue

Steps to reproduce the issue

  1. brew install podman
  2. podman machine init
  3. podman machine start

Describe the results you received

VM fails to start.

Describe the results you expected

VM starts.

podman info output

Version: 4.7.2
OS: macOS 14.2
Chip: Apple M3 Pro
Architecture: arm64

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Activity

changed the title [-]`podman machine start` stuck "Waiting for VM" indefinitely with qemu synchronous exception[/-] [+]`podman machine start` stuck "Waiting for VM" indefinitely with qemu synchronous exception MacOS M3[/+] on Nov 25, 2023
danielroseman

danielroseman commented on Nov 27, 2023

@danielroseman

I had this issue; updating qemu from 8.1.3_1 to 8.1.3_2 via brew upgrade qemu fixed it.

peter-crist

peter-crist commented on Nov 27, 2023

@peter-crist
Author

Updating to qemu 8.1.3_2 resulted in a different exception and hang:

ASSERT [ArmCpuDxe] /home/kraxel/projects/qemu/doms/edk2/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c(333): ((BOOLEAN)(0==1))
jwhostet

jwhostet commented on Nov 28, 2023

@jwhostet

Reading through some other issues I've found this workaround: podman machine init -m 3072

podman 4.7.2
qemu 8.1.3_2
MacOs 14.1.1 - M3 Max

peter-crist

peter-crist commented on Nov 28, 2023

@peter-crist
Author

Reading through some other issues I've found this workaround: podman machine init -m 3072

Unfortunately no such luck on my end.

mchataigner

mchataigner commented on Nov 29, 2023

@mchataigner

podman machine init -m 3072 solved the issue for me

podman 4.8.8
qemu 8.1.3_2
MacOs 14.1.1 - M3 pro

jaydorsey

jaydorsey commented on Nov 29, 2023

@jaydorsey

Reading through some other issues I've found this workaround: podman machine init -m 3072

Unfortunately no such luck on my end.

I didn't have any luck doing this initially either; then I absolutely nuked everything:

  1. Killed all the podman related processes using Activity Monitor
  2. Ran podman machine rm to delete the machine
  3. Uninstalled podman, podman desktop, and qemu

Re-ran it all from scratch today, starting with podman only and then running podman desktop afterwards:

  1. Reinstall podman & qemu
  2. Run the command from jwhostet, then podman machine start and it worked
  3. Open up podman desktop, everything looks good

podman 4.8.0
qemu 8.1.3_2
macos 14.1.1 M3 Max

I have a max, you have a pro, but one other person with a pro reported success so double-checking everything might be worth a shot? I tried similar steps before but skipped the podman machine rm step before and I deleted podman desktop by just dragging it to the trash before so that might have been why it failed the first time

robahtou

robahtou commented on Nov 30, 2023

@robahtou

@jaydorsey I have the same specs and followed your instructions. I am still unable to get the VM to run:
Waiting for VM ...

EDIT:
I installed brew install podman-desktop and enabled podman engine this way and it is working now 🤷🏽‍♂️

peter-crist

peter-crist commented on Nov 30, 2023

@peter-crist
Author

@jaydorsey I have the same specs and followed your instructions. I am still unable to get the VM to run: Waiting for VM ...

EDIT: I installed brew install podman-desktop and enabled podman engine this way and it is working now 🤷🏽‍♂️

This worked for me as well!
Additionally, I did the following before installing podman-desktop:

  • brew uninstall podman
  • brew uninstall qemu
  • Removed any lingering podman files I could find:
    • Removed ~/.ssh/podman-machine-default and ~/.ssh/podman-machine-default.pub.
    • Removed ~/.local/share/containers and ~/.config/containers
jaydorsey

jaydorsey commented on Dec 1, 2023

@jaydorsey

One thing of maybe note: It worked great yesterday. I let my machine go to sleep, logged back on today, and the whole thing was locked up again list it was. Podman said it wasn't running, but it actually was, I can't delete images or machines, everything was essentially responsive. I tried force-quitting everything and restarting with no luck

I need to try a restart/reboot of my computer later to see if that fixes it but it didn't seem to work after I let my computer sleep (or perhaps some other unrelated reason, like a crash)

peter-crist

peter-crist commented on Dec 1, 2023

@peter-crist
Author

And now I'm seeming to have problems with volumes and my VM is somehow back in a "Currently starting" state. Can't stop, or remove it. 👎

79 remaining items

fuzzball81

fuzzball81 commented on Jan 29, 2024

@fuzzball81

I can confirm using the 8.1.3 version of qemu does allow the VM to start on a M1 on macOS 14.3 with podman 4.9.

cfergeau

cfergeau commented on Jan 30, 2024

@cfergeau
Contributor

QEMU 8.2.1 has been released and is available in brew. Hopefully this fixes this issue.

robahtou

robahtou commented on Jan 30, 2024

@robahtou

Can confirm that the update to QEMU 8.2.1 fixed the issue!!
I made sure to start with a clean slate so removed all the programs and folders/files as has been stated above.

benoitschipper

benoitschipper commented on Jan 30, 2024

@benoitschipper

Hey All,

Just did the following to make this work without downgrading (Thanks @cfergeau and @robahtou for the mention's):

Remove the Machine:

podman machine rm
...
Are you sure you want to continue? [y/N] y

# Press y to make sure to remove everything

Upgrade to the latest QEMU:

brew update && brew upgrade
...
==> Upgrading qemu
  8.2.0 -> 8.2.1

Re-Init your Podman Machine:

Extracting compressed file: podman-machine-default_fedora-coreos-39.20240112.2.0-qemu.aarch64.qcow2: done
Image resized.
Machine init complete
To start your machine run:

	podman machine start

Start your Podman Machine:

Starting machine "podman-machine-default"
Waiting for VM ...
Mounting volume... /Users:/Users
Mounting volume... /private:/private
Mounting volume... /var/folders:/var/folders

This machine is currently configured in rootless mode. If your containers
require root permissions (e.g. ports < 1024), or if you run into compatibility
issues with non-podman clients, you can switch using the following command:

        podman machine set --rootful

API forwarding listening on: /var/run/docker.sock
Docker API clients default to this address. You do not need to set DOCKER_HOST.

Machine "podman-machine-default" started successfully

This worked for me on M1, M2 and M3! 🥳

dedenf

dedenf commented on Jan 31, 2024

@dedenf

just want to update my issue, after upgrading QEMU to 8.2.1, the problem seems go away, tried using applehv but somehow if i did not set the amount of disk, it will took all of the available space and crippling my system, so upgrading QEMU works 👍 .

now i can pull and operate as usual

  version:
  APIVersion: 4.8.3
  Built: 1704291040
  BuiltTime: Wed Jan  3 21:10:40 2024
  GitCommit: ""
  GoVersion: go1.21.5
  Os: linux
  OsArch: linux/arm64
  Version: 4.8.3
QEMU emulator version 8.2.1
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers
cfergeau

cfergeau commented on Jan 31, 2024

@cfergeau
Contributor

it will took all of the available space and crippling my system

I don't know what you saw exactly, but while it's true applehv will create a 100GB disk image, it is a sparse image, and it won't use 100GB on disk unless it's filled.
It's doing the equivalent of:

$ truncate -s 100G foo.img
$ du -sh foo.img
0
dedenf

dedenf commented on Feb 1, 2024

@dedenf

@cfergeau so the system prompt me with warning that i had low free space after initiatingpodman machine init using applehv as its image, during the extraction it took more than 100GB, i had like 130GB+ free space at that time, but all of them taken by the extraction.

cfergeau

cfergeau commented on Feb 9, 2024

@cfergeau
Contributor

@cfergeau so the system prompt me with warning that i had low free space after initiatingpodman machine init using applehv as its image, during the extraction it took more than 100GB, i had like 130GB+ free space at that time, but all of them taken by the extraction.

Turns out podman did not create sparse files when extracting its disk images, but that's been solved in the main branch.

thiner

thiner commented on Mar 14, 2024

@thiner

I followed @benoitschipper's guide, fixed the problem. One more step I had to do is that I uninstalled homebrew and then install it back. The reason is that I migrated my Mac system from previous Intel cpu Mac Book Pro to a new M3 Mac Book Pro. When I ran the podman machine start command, it prompted that my qemu is a x86 binary. I tried to reinstall qemu but that didn't work. I solved the problem by purge existing homebrew, and reinstall it.

Luap99

Luap99 commented on Apr 4, 2024

@Luap99
Member

podman 5.0 no longer supports qemu on macos and uses the apple hypervisor by default.

locked as resolved and limited conversation to collaborators on Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.locked - please file new issue/PRAssist humans wanting to comment on an old issue or PR with locked comments.machinemacosMacOS (OSX) related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @dedenf@danielroseman@szafranek@jaydorsey@relistan

        Issue actions