可以让Podman在Mac M1 Monterey上奔跑
到目前为止,我已经完成了以下操作:
- brew install qemu(显然是Podman需要的,但还是想将其用于VMS)
- brew install install podman
- 修改〜/.config/contains/contains.conf,并将以下行添加到[Engine]部分:
[“/users/user/dev/homebrew/cellar/cellar/podman/4.1.0/bin","/bin"/users/user/user/dev/dev/homebrew/homebrew/cellar/cellar/podman/podman/4.1.0/libexec
- ,,
- helper_binaries_dir = 首先
,机器启动抱怨它无法在VAR/文件夹/V0/XQF571MJ5SG5X7K4J1DPB1_W0000GN/T/T/PODMAN/PODMAN/PODMAN/PODMAN/PODMAN/PODMAN-MACHINE-MACHINE-MACHINE-DEFAULT_REAKE.SOCK上拨打UNIX插座。该文件存在,因此不知道问题是什么。
我重新启动以查看是否会有所帮助,现在该套接字不再存在,但是Podman Machine Start仍然希望使用它。重新设计Podman Machine Init只会给出此错误:
错误:Podman-Machine-Default:VM
一旦成功地进入,VM就会总是发生错误,因此似乎与我的问题无关。
据我从阅读的各个网页中获得的胜利。希望有人可以提供进一步的帮助:)
我已经离开Mac已有十多年了,所以真的不知道Podman之类的东西应该如何工作,显然它需要QEMU来为每个容器运行VM。
我最好使用Docker Desktop作为Mac而不是与Podman战斗?如果是这样,我将使用它。 Podman在我的Linux桌面上很容易,但也许在Mac上或至少在M1上不值得,因为它是手臂。
I have done the following so far:
- brew install qemu (apparently needed for podman, but want to use it for VMs anyway)
- brew install podman
- modify ~/.config/containers/containers.conf and add following line to [engine] section:
helper_binaries_dir = ["/Users/user/dev/homebrew/Cellar/podman/4.1.0/bin","/Users/user/dev/homebrew/Cellar/podman/4.1.0/libexec"]
- podman machine init
- podman machine start
Initially, machine start complained it could not dial up a unix socket at var/folders/v0/xqf571mj5sg5x7k4j1dpb1_w0000gn/T/podman/podman-machine-default_ready.sock. That file existed, so don't know what the problem was.
I rebooted to see if that would help, and now that socket file no longer exists, but podman machine start still wants to use it. Rerunning podman machine init just gives this error:
Error: podman-machine-default: VM already exists
That error always occurs once it successfully inits, so doesn't seem to be related to my issue.
That's as far as I can get from various web pages I read. Hopefully someone can provide further help :)
I've been away from using a Mac for over a decade, so really have no idea how stuff like podman is supposed to work, beyond it apparently needs QEMU to run a VM for each container.
Am I better off using Docker Desktop for Mac instead of fighting with podman? If so, I'll just use that. Podman was butt easy on my Linux desktop, but maybe it's not worth the trouble on a Mac, or at least on an M1 since it's an arm.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
经过一段时间的调试,我发现了这个问题的原因。
此问题是由于QEMU 7.0.0启动延迟(3-5s)引起的,该潜伏期(3-5s)在Mac Machine启动后的每个QEMU执行中都出现。
Podman有一些错误,这些错误不希望通过QEMU调用完成的袜子文件的创建可以延迟几秒钟,并且当Podman试图访问袜子文件时,QEMU尚未创建它们,显示错误”错误:Dialunix /podman/podman-machine-default_ready.sock:连接:连接拒绝”。
为了避免此问题,即使使用无效的选项(仅是初始化),在调用“ Podman Machine启动”之前,只需执行QEMU即可。
After some time debugging, I found the cause of this problem.
This problem is caused due to qemu 7.0.0 startup latency (3-5s) that occour in every first qemu execution after Mac Machine machine boots.
Podman has some bug that doesn't expect that the creation of socks files, done by the qemu call, can be delayed some seconds, and when podman tries to access the socks files, the qemu is not created them yet, showing the error "Error: dial unix /podman/podman-machine-default_ready.sock: connect: connection refused".
To avoid this problem, just execute qemu, even with invalid options (just to initialize), before call "podman machine start".
昨天我也有一个类似的问题,与其他人一样。该解决方案来自
您可以在蒙特雷(Monterrey)上降级到QEMU 6.2.0:
I had a similar issue yesterday, as have others. The solution comes from the issue thread linked in the comment above. The problem was resolved by downgrading the version of QEMU from the one currently available as default on homebrew.
You can downgrade to QEMU 6.2.0 on Monterrey with the following: