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

unpacking failed (error: exit status 125; output: Error: unrecognized command podman / #23971

Closed
harshalparekh6 opened this issue Sep 16, 2024 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug. macos MacOS (OSX) related remote Problem is in podman-remote

Comments

@harshalparekh6
Copy link

Issue Description

I am trying to run podman (amd64) inside podman (amd64) on MacOS Sonoma 14.6.1 and it is failing with:

Error: copying system image from manifest list: writing blob: adding layer with blob "sha256:333bc3ffacb9d6460ffa9424a2db28dee18c917e978408c8b869eb4b8fc6fd24"/""/"sha256:9ba1617a86008118b1a3cccc006ce415eb13d59cf0e266d7b5183eec0e63d5d1": unpacking failed (error: exit status 125; output: Error: unrecognized command `podman /`

The following command works fine, but I want it to be able to run amd64 inside amd64:

podman run --arch=arm64 --user podman --privileged quay.io/podman/stable podman run --security-opt label=disable --arch=amd64 ubi8 echo hello

Do we have a similar guide https://www.redhat.com/sysadmin/podman-inside-container for MacOS?

Steps to reproduce the issue

Steps to reproduce the issue

  1. Run this command on MacOS Sonoma 14.6.1: $ podman run --arch=amd64 --user podman --privileged quay.io/podman/stable podman run --security-opt label=disable --arch=amd64 ubi8 echo hello`

Outputs:

Trying to pull quay.io/podman/stable:latest...
Getting image source signatures
Copying blob sha256:e1692216987b1447a9ace3eeea25a42598468715ee96e4797c3916eda6559078
Copying blob sha256:1c871c9e1156f017971f22e9a8962f6163e3794b022f9d7335d948b579c86f51
Copying blob sha256:42521c433f9942aafd017c3ad2d66c324a3e750c892f13c571bfd272af8ce289
Copying blob sha256:f00759b0f86cb3e5ff41e2f8bf3333d5f751cf0e08f4ed4181adbf2b1eaa4584
Copying blob sha256:4a7ba16125a5f25cccf7d8344af926c3178b7eaa97df41a9e546c96ff6c519fb
Copying blob sha256:600940db6cefe5d3b2af5c6933feca46ad2481b3d122986cdf4f574c71fec32c
Copying blob sha256:ba895d446c26ec25b7b7445605023b7d493075e5ef6a050fd106e20cd4014fb9
Copying blob sha256:4120b6484c19622df088e25ebc173c697ef3d6fee21e962b6df336dc66884c14
Copying blob sha256:4e4b247a60f1f48d3e4c7d54d37b6af98a7f729628db89f9695880fab7839339
Copying blob sha256:875102153b9de9e4af592b29bd5fbde369f0c4e8231833fe0ebde54c75ea6e88
Copying config sha256:fde8a686fd1734d01a575d28fdebfa9494b939301a94b95e5f827f59d0b1067e
Writing manifest to image destination
Resolved "ubi8" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull registry.access.redhat.com/ubi8:latest...
Getting image source signatures
Checking if image destination supports signatures
Copying blob sha256:333bc3ffacb9d6460ffa9424a2db28dee18c917e978408c8b869eb4b8fc6fd24
Error: copying system image from manifest list: writing blob: adding layer with blob "sha256:333bc3ffacb9d6460ffa9424a2db28dee18c917e978408c8b869eb4b8fc6fd24"/""/"sha256:9ba1617a86008118b1a3cccc006ce415eb13d59cf0e266d7b5183eec0e63d5d1": unpacking failed (error: exit status 125; output: Error: unrecognized command `podman /`

Did you mean this?
	cp
	ps
	rm

Try 'podman --help' for more information
)

Describe the results you received

Error: copying system image from manifest list: writing blob: adding layer with blob "sha256:333bc3ffacb9d6460ffa9424a2db28dee18c917e978408c8b869eb4b8fc6fd24"/""/"sha256:9ba1617a86008118b1a3cccc006ce415eb13d59cf0e266d7b5183eec0e63d5d1": unpacking failed (error: exit status 125; output: Error: unrecognized command `podman /`

Describe the results you expected

To be able to run podman inside podman on MacOS

podman info output

$ podman info
host:
  arch: arm64
  buildahVersion: 1.36.0
  cgroupControllers:
  - cpu
  - io
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.10-1.fc40.aarch64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.10, commit: '
  cpuUtilization:
    idlePercent: 99.55
    systemPercent: 0.1
    userPercent: 0.35
  cpus: 8
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    variant: coreos
    version: "40"
  eventLogger: journald
  freeLocks: 1992
  hostname: localhost.localdomain
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 1000000
    uidmap:
    - container_id: 0
      host_id: 502
      size: 1
    - container_id: 1
      host_id: 100000
      size: 1000000
  kernel: 6.8.11-300.fc40.aarch64
  linkmode: dynamic
  logDriver: journald
  memFree: 11607891968
  memTotal: 16703303680
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.11.0-1.20240531102943328308.main.4.g6838c50.fc40.aarch64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.12.0-dev
    package: netavark-1.11.0-1.20240606174759319307.main.8.gfebe31a.fc40.aarch64
    path: /usr/libexec/podman/netavark
    version: netavark 1.12.0-dev
  ociRuntime:
    name: crun
    package: crun-1.15-1.20240607090105650503.main.32.gea54402.fc40.aarch64
    path: /usr/bin/crun
    version: |-
      crun version UNKNOWN
      commit: 7cfd0aeb40e4605b6b0ee0afd9cfca80f9c5f68a
      rundir: /run/user/502/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20240510.g7288448-1.fc40.aarch64
    version: |
      pasta 0^20240510.g7288448-1.fc40.aarch64-pasta
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: /run/user/502/podman/podman.sock
  rootlessNetworkCmd: pasta
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.2-2.fc40.aarch64
    version: |-
      slirp4netns version 1.2.2
      commit: 0ee2d87523e906518d34a6b423271e4826f71faf
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.3
  swapFree: 0
  swapTotal: 0
  uptime: 6h 30m 48.00s (Approximately 0.25 days)
  variant: v8
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /var/home/core/.config/containers/storage.conf
  containerStore:
    number: 17
    paused: 0
    running: 1
    stopped: 16
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /var/home/core/.local/share/containers/storage
  graphRootAllocated: 106769133568
  graphRootUsed: 70919860224
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 158
  runRoot: /run/user/502/containers
  transientStore: false
  volumePath: /var/home/core/.local/share/containers/storage/volumes
version:
  APIVersion: 5.1.1
  Built: 1717459200
  BuiltTime: Mon Jun  3 19:00:00 2024
  GitCommit: ""
  GoVersion: go1.22.3
  Os: linux
  OsArch: linux/arm64
  Version: 5.1.1
$ podman version
Client:       Podman Engine
Version:      5.2.2
API Version:  5.2.2
Go Version:   go1.23.0
Git Commit:   fcee48106a12dd531702d729d17f40f6e152027f
Built:        Wed Aug 21 12:43:11 2024
OS/Arch:      darwin/arm64

Server:       Podman Engine
Version:      5.1.1
API Version:  5.1.1
Go Version:   go1.22.3
Built:        Mon Jun  3 19:00:00 2024
OS/Arch:      linux/arm64


### Podman in a container

Yes

### Privileged Or Rootless

Privileged

### Upstream Latest Release

Yes

### Additional environment details

MacOS Sonoma 14.6.1

### Additional information

_No response_
@harshalparekh6 harshalparekh6 added the kind/bug Categorizes issue or PR as related to a bug. label Sep 16, 2024
@github-actions github-actions bot added macos MacOS (OSX) related remote Problem is in podman-remote labels Sep 16, 2024
@Luap99
Copy link
Member

Luap99 commented Sep 17, 2024

The emulation is not compatible with applications that reexec themselves on need argv0 to be preserved which we do.
see containers/buildah#5322 (reply in thread) for more info

@Luap99 Luap99 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. macos MacOS (OSX) related remote Problem is in podman-remote
Projects
None yet
Development

No branches or pull requests

2 participants