Skip to content

Podman machine fails with qemu 7.0.0 on M1 mac #102242

Closed

Description

@arixmkii

brew gist-logs <formula> link OR brew config AND brew doctor output

% brew config
HOMEBREW_VERSION: 3.4.11-108-g73ee7f6
ORIGIN: https://github.com/Homebrew/brew
HEAD: 73ee7f677286f50291736518f017a202f5579de1
Last commit: 9 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 419a75bbc13b67f3766b408ff54620ad5e72d278
Core tap last commit: 49 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_CORE_GIT_REMOTE: https://github.com/Homebrew/homebrew-core
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 13.1.6 build 1316
Git: 2.36.1 => /opt/homebrew/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.4-arm64
CLT: 13.4.0.0.1.1651278267
Xcode: 13.4
Rosetta 2: false
% brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed kegs have no formulae!
This means they were either deleted or installed manually.
You should find replacements for the following formulae:
  szip

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  tbb@2020

Verification

  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?

Updated qemu to 7.0.0 and tried to use podman (from homebrew)

What happened (include all command output)?

Commands

podman machine init --cpus=4 --disk-size=64 --memory=6144
podman machine start

It fails. If I enable debug output of podman i can get qemu command and if I run it in console it fails with error message "can't get socket option SO_TYPE"

What did you expect to happen?

Everything works and machine starts just fine. Like it was with 6.2.0_1. I reverted to manually downloaded bottle 6.2.0_1 and it works now.

Step-by-step reproduction instructions (by running brew commands)

brew install qemu podman
podman machine init --cpus=4 --disk-size=64 --memory=6144
podman machine start

Machine is not started.

Activity

  1. added
    bugReproducible Homebrew/homebrew-core bug
    on May 25, 2022
  2. SMillerDev commented on May 25, 2022

    @SMillerDev
    Member

    What made you think this is a packaging issue?

  3. arixmkii commented on May 25, 2022

    @arixmkii
    Author

    I'm not stating that it is packaging issue. It might be upstream (probably it is in fact). For now I'm only reflecting, that this version bump could be breaking for end users of Homebrew. And that there is no easy way of downgrading version (liek @6 or @6.2 tagged formula of qemu).

    As I can't allow to have this machine in broken state I will need to build qemu from sources to check upstream and report it there. This will take some time.

    If you consider this is not an issue for Homebrew - it is ok to close this one and I will focus to reporting this upstream.

  4. arixmkii commented on May 25, 2022

    @arixmkii
    Author

    Will post a workaround, which worked for me, so, others facing it could have some help.

    1. Take the bottle hash from latest 6.2 series commit here
    2. install with brew install -f

    Notes: you might first need to uninstall updated version (ignoring packages, which depends on it)

    Example for arm64 monterey:

    curl -L -H "Authorization: Bearer QQ==" -o qemu-6.2.0_1.monterey.bottle.tar.gz https://ghcr.io/v2/homebrew/core/qemu/blobs/sha256:fcc3b1a8139f70dae57f5449f3856f9b3b67448ee0623e64da1e47dc255b46f6
    brew install -f qemu-6.2.0_1.monterey.bottle.tar.gz
    
  5. disc commented on Jun 6, 2022

    @disc

    Once installed arm64_monterey version of qemu 6.2 I can't launch qemu-system-aarch64 at all.

    ➜ brew install -f qemu-6.2.0_1.monterey.bottle.tar.gz
    Running `brew update --preinstall`...
    Warning: qemu 7.0.0 is available and more recent than version 6.2.0_1.
    ==> Pouring qemu-6.2.0_1.monterey.bottle.tar.gz
    🍺  /usr/local/Cellar/qemu/6.2.0_1: 162 files, 557.4MB
    ==> Running `brew cleanup qemu`...
    Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
    Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
    
    ➜ qemu-system-aarch64 --version
    [1]    3068 killed     qemu-system-aarch64 --version
    

    But it works when I install x86? version of qemu 6.2 (monterey:"d086496727bc70e98e33c48d7815d39a113ebeccb45a6958dacad8cb7e388e8f") by the command with another sha256:
    curl -L -H "Authorization: Bearer QQ==" -o qemu-6.2.0_1.monterey.bottle.tar.gz https://ghcr.io/v2/homebrew/core/qemu/blobs/sha256:d086496727bc70e98e33c48d7815d39a113ebeccb45a6958dacad8cb7e388e8f

    ➜ qemu-system-aarch64 --version
    QEMU emulator version 6.2.0
    Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
    

    But this version doesn't solve the main issue with podman machine start

    Starting machine "podman-machine-default"
    Waiting for VM ...
    Error: dial unix /var/folders/7x/n6d05fy55fl6drf_zs01qk2r0000gn/T/podman/podman-machine-default_ready.sock: connect: connection refused
    

    Has anyone faced with the same issue?

  6. arixmkii commented on Jun 6, 2022

    @arixmkii
    Author

    @disc Could it be that your brew installation was migrated via backup restore from Intel Mac? Because this behavior looks weird.

  7. disc commented on Jun 6, 2022

    @disc

    @disc Could it be that your brew installation was migrated via backup restore from Intel Mac? Because this behavior looks weird.

    Yes, it works once I reinstalled Homebrew on M1 mac

  8. arixmkii commented on Jun 10, 2022

    @arixmkii
    Author

    Might be a podman config issue after all podman-container-tools/podman#14303 (comment)

    Manually changing podman machine settings after creation allowed me to run latest podman and latest qemu from brew
    podman-container-tools/podman#14303 (comment)

    Should brew consider adding a patch to podman formula then or just wait for podman fixes?

    Should I rename this or create a new issue?

  9. SMillerDev commented on Jun 10, 2022

    @SMillerDev
    Member

    If podman makes a patch we can include it in the formula.

  10. arixmkii commented on Jun 10, 2022

    @arixmkii
    Author

    @SMillerDev I don't really know the acceptable form for patches. They created a PR podman-container-tools/podman#14563 Probably this commit could be of some use.

  11. ashley-cui commented on Jun 10, 2022

    @ashley-cui
    Contributor

    @arixmkii @SMillerDev I can handle getting the patch in once the PR merges!

  12. github-actions commented on Jul 1, 2022

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

  13. locked as resolved and limited conversation to collaborators on Aug 8, 2022
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

    bugReproducible Homebrew/homebrew-core bugoutdatedPR was locked due to agestaleNo recent activityupstream issueAn upstream issue report is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions