-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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 VM fails to start on MacOS due to gvproxy runtime path resolution #141041
Comments
Commentary for future searchers: Having fixed the problem above, containers/podman#11837 (comment) gave me the solution to solve: Error: error preparing container <> for attach: error configuring network namespace for container <>: error adding pod <> to CNI network "podman": unexpected end of JSON input |
We can't do anything to fix this here, would need to happen upstream. It also has other problems on darwin (e.g. store paths get written to the vm config and break when GCed) so I've been thinking that we should remove the wrapper as it isn't working as intended. #141061 |
Upstream had considered (in containers/podman#11449 (comment)) making this build-time configurable. I believe that would have worked quite well for nix. Sadly (for us), they went with runtime.
Am I correct to understand that you're referring to what ends up in {
"CPUs": 2,
"CmdLine": [
"/nix/store/hbz1lflkjc4kjjbx2gp5kh0dmii1f5n8-qemu-6.1.0/bin/qemu-system-x86_64",
"-m" If so, it seems that I'm going to drop some links among the relevant issues; perhaps there's a way to handle this upstream. |
Buildtime or runtime via a envvar/flag that we could wrap. Managing
Yes, I think there may also have been more than one path per VM written to either |
Closes NixOS#141041 Once 4.0.0 is released, there will be an environment variabled that we can set in the wrapper. Until then, this allows `podman machine start` to work on Darwin.
Closes NixOS#141041 Once 4.0.0 is released, there will be an environment variabled that we can set in the wrapper. Until then, this allows `podman machine start` to work on Darwin.
Describe the bug
On MacOS,
podman machine
manages the Linux VM used bypodman
. As part of that, thegvproxy
binary is used to configure networking. containers/podman#11449 introduced behavior which defers to acontainers.conf
file at runtime to decide in which paths to search for helper binaries likegvproxy
.From
man containers.conf
:Although the derivation for podman includes
gvproxy
when on MacOS...nixpkgs/pkgs/applications/virtualization/podman/wrapper.nix
Lines 22 to 38 in f23731c
... the binary is not located in the paths where podman searches.
This can be fixed by adding the following to
$HOME/.config/containers/containers.conf
:[engine] helper_binaries_dir = ["/nix/store/856hg1fhkikx4sinc8pd5q87k062zqpq-gvproxy-0.1.0/bin"]
Steps To Reproduce
Steps to reproduce the behavior:
nix-env -iA nixos.podman
podman machine init && podman machine start
Expected behavior
podman machine start
is able to start the VM without getting an errorNotify maintainers
@adisbladis
@saschagrunert
@vdemeester
@zowoq
Metadata
The text was updated successfully, but these errors were encountered: