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

[Bug]: aarch64-darwin: podman installed from nixpkgs uses wrong path for edk2-aarch64-code.fd #17026

Closed
n8henrie opened this issue Jan 7, 2023 · 3 comments · Fixed by #17027
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue

Comments

@n8henrie
Copy link
Contributor

n8henrie commented Jan 7, 2023

Issue Description

podman 4.3.1 installed via nixpkgs, I get an error about the path to edk2-aarch64-code.fd upon podman machine start. Several prior related issues and PRs:

It looks like the current code requires minimal changes to work with nixpkgs -- just resolve the symlink to the real location of qemu in the nix path and everything works.

Steps to reproduce the issue

Steps to reproduce the issue

  1. nix shell nixpkgs#podman
  2. podman machine init
  3. podman machine start

Describe the results you received

Error about path to edk2-aarch64-code.fd (sorry, now getting a different error about the socket -- will update this with the error output after a reboot).

UPDATE:

$ podman machine start
Starting machine "podman-machine-default"
Waiting for VM ...
Error: qemu exited unexpectedly with exit code 1, stderr: qemu-system-aarch64: -drive file=edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on: Could not open 'edk2-aarch64-code.fd': No such file or directory

Describe the results you expected

Podman starts

podman info output

$ podman --version
podman version 4.3.1


`podman info` gives an error

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

No

Additional environment details

MacOS 13.1, nixpkgs 22.11

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

A friendly reminder that this issue had no activity for 30 days.

n8henrie added a commit to n8henrie/podman that referenced this issue Feb 7, 2023
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/podman that referenced this issue Feb 8, 2023
@ashley-cui
Copy link
Member

Reopening, as the patch was reverted.

@ashley-cui ashley-cui reopened this Apr 24, 2023
@n8henrie
Copy link
Contributor Author

n8henrie commented Apr 24, 2023

@ashley-cui -- thank you kindly, I think this perhaps can be closed as I've found a reasonable workaround. At least it seems reasonable to me :)

For whatever reason, $out/share/qemu/edk2-aarch64-code.fd is not symlinked from pkgs.qemu to anywhere convenient for nix users on nix-darwin that are using a declarative config. It is symlinked into ~/.nix-profile for anyone using nix profile install nixpkgs#qemu, and one can convince nix-darwin to symlink to /run/current-system/sw/share/qemu/edk2-aarch64-code.fd by including the below line in their configuration.nix:

environment.pathsToLink = ["/share/qemu"];

With either route, once one has a semi-durable path to edk2-aarch64-code.fd, this path can be used in e.g. ~/.config/containers/podman/machine/qemu/podman-machine-default.json. The downside to this approach is that one loses the reproducibility for which nix is famous (as there is no guarantee what version of qemu is providing that path), but on the other hand it should work as well as the current homebrew approach.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Aug 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue
Projects
None yet
2 participants