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

Podman machine fails with qemu 7.0.0 on M1 mac #102242

Closed
2 tasks done
arixmkii opened this issue May 25, 2022 · 12 comments
Closed
2 tasks done

Podman machine fails with qemu 7.0.0 on M1 mac #102242

arixmkii opened this issue May 25, 2022 · 12 comments
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age stale No recent activity upstream issue An upstream issue report is needed

Comments

@arixmkii
Copy link

arixmkii commented May 25, 2022

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.

@arixmkii arixmkii added the bug Reproducible Homebrew/homebrew-core bug label May 25, 2022
@SMillerDev
Copy link
Member

What made you think this is a packaging issue?

@arixmkii
Copy link
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.

@arixmkii
Copy link
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

@disc
Copy link

disc commented Jun 6, 2022

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?

@arixmkii
Copy link
Author

arixmkii commented Jun 6, 2022

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

@disc
Copy link

disc commented Jun 6, 2022

@arixmkii I think so, I'm going to update Brew by this instruction:
https://github.com/orgs/Homebrew/discussions/417#discussioncomment-2556937

@disc
Copy link

disc commented Jun 6, 2022

@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

@arixmkii
Copy link
Author

Might be a podman config issue after all containers/podman#14303 (comment)

Manually changing podman machine settings after creation allowed me to run latest podman and latest qemu from brew
containers/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?

@SMillerDev
Copy link
Member

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

@arixmkii
Copy link
Author

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

@ashley-cui
Copy link
Contributor

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

@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2022

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

@github-actions github-actions bot added the stale No recent activity label Jul 1, 2022
@github-actions github-actions bot closed this as completed Jul 9, 2022
@github-actions github-actions bot added the outdated PR was locked due to age label Aug 8, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age stale No recent activity upstream issue An upstream issue report is needed
Projects
None yet
Development

No branches or pull requests

4 participants