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 init failing on wsl-2 #22291

Closed
mwoodpatrick opened this issue Apr 6, 2024 · 3 comments
Closed

podman machine init failing on wsl-2 #22291

mwoodpatrick opened this issue Apr 6, 2024 · 3 comments
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.

Comments

@mwoodpatrick
Copy link

Issue Description

Running:

podman machine init --cpus 4 --disk-size 50 --image docker://registry/repo/archlinux: latest --memory 8192 --username mwoodpatrick --volume /mnt:/mnt westie-arch

fails with:

Looking up Podman Machine image at docker.io/registry/repo/archlinux:latest to create VM
Error: reading manifest latest in docker.io/registry/repo/archlinux: requested access to the resource is denied

However running:

podman image pull archlinux:latest

Works as expected

Steps to reproduce the issue

On WSL-2 version: 2.2.1.0 run:

podman machine init --cpus 4 --disk-size 50 --image docker://registry/repo/archlinux: latest --memory 8192 --username mwoodpatrick --volume /mnt:/mnt westie-arch

Describe the results you received

fails with:

Looking up Podman Machine image at docker.io/registry/repo/archlinux:latest to create VM
Error: reading manifest latest in docker.io/registry/repo/archlinux: requested access to the resource is denied

Describe the results you expected

Podman machine would be created

podman info output

host:
  arch: amd64
  buildahVersion: 1.35.3
  cgroupControllers:
  - cpu
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: /usr/bin/conmon is owned by conmon 1:2.1.10-1
    path: /usr/bin/conmon
    version: 'conmon version 2.1.10, commit: 2dcd736e46ded79a53339462bc251694b150f870'
  cpuUtilization:
    idlePercent: 99.94
    systemPercent: 0.03
    userPercent: 0.03
  cpus: 12
  databaseBackend: sqlite
  distribution:
    distribution: westie
    version: "00.03"
  eventLogger: journald
  freeLocks: 2048
  hostname: mlwphpenvy360
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.15.150.1-microsoft-standard-WSL2
  linkmode: dynamic
  logDriver: journald
  memFree: 32433070080
  memTotal: 33509527552
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: /usr/lib/podman/aardvark-dns is owned by aardvark-dns 1.10.0-1
      path: /usr/lib/podman/aardvark-dns
      version: aardvark-dns 1.10.0
    package: /usr/lib/podman/netavark is owned by netavark 1.10.3-1
    path: /usr/lib/podman/netavark
    version: netavark 1.10.3
  ociRuntime:
    name: crun
    package: /usr/bin/crun is owned by crun 1.14.4-1
    path: /usr/bin/crun
    version: |-
      crun version 1.14.4
      commit: a220ca661ce078f2c37b38c92e66cf66c012d9c1
      rundir: /run/user/1000/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  pasta:
    executable: /usr/sbin/pasta
    package: /usr/bin/pasta is owned by passt 2024_03_26.4988e2b-2
    version: |
      pasta 2024_03_26.4988e2b
      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: false
    path: /run/user/1000/podman/podman.sock
  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: /etc/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/sbin/slirp4netns
    package: /usr/bin/slirp4netns is owned by slirp4netns 1.2.3-1
    version: |-
      slirp4netns version 1.2.3
      commit: c22fde291bb35b354e6ca44d13be181c76a0a432
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.5
  swapFree: 8588873728
  swapTotal: 8589934592
  uptime: 0h 43m 39.00s
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries: {}
store:
  configFile: /home/mwoodpatrick/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/mwoodpatrick/.local/share/containers/storage
  graphRootAllocated: 1081101176832
  graphRootUsed: 4517654528
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 1
  runRoot: /run/user/1000/containers
  transientStore: false
  volumePath: /home/mwoodpatrick/.local/share/containers/storage/volumes
version:
  APIVersion: 5.0.1
  Built: 1712088128
  BuiltTime: Tue Apr  2 13:02:08 2024
  GitCommit: 946d055df324e4ed6c1e806b561af4740db4fea9-dirty
  GoVersion: go1.22.1
  Os: linux
  OsArch: linux/amd64
  Version: 5.0.1

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

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

@mwoodpatrick mwoodpatrick added the kind/bug Categorizes issue or PR as related to a bug. label Apr 6, 2024
@mwoodpatrick
Copy link
Author

Also this run command fails:

podman run -it docker://registry/repo/archlinux:latest bash

fails with:

Trying to pull docker.io/registry/repo/archlinux:latest...
Error: initializing source docker://registry/repo/archlinux:latest: reading manifest latest in docker.io/registry/repo/archlinux: requested access to the resource is denied

However, as noted above pulling the image works as does a run using this pulled image:

podman run -it archlinux:latest bash

Running:

podman image ls

shows:

REPOSITORY                   TAG         IMAGE ID      CREATED      SIZE
docker.io/library/archlinux  latest      0cda8061254a  3 weeks ago  446 MB

@rhatdan
Copy link
Member

rhatdan commented Apr 6, 2024

The specification "registry/repo" is invalid, there is no archlinux at this location.

@rhatdan rhatdan closed this as completed Apr 6, 2024
@mwoodpatrick
Copy link
Author

Would be helpful if the podman docs:

https://docs.podman.io/en/latest/markdown/podman-machine-init.1.html

Gave an example of using the --image command to initialize a podman machine. The archlinux docker image does exist:

https://hub.docker.com/_/archlinux

podman image ls

shows:

REPOSITORY                   TAG         IMAGE ID      CREATED      SIZE
docker.io/library/archlinux  latest      0cda8061254a  3 weeks ago  446 MB

But running:

podman machine init --cpus 4 --disk-size 50 --image docker://docker.io/library/archlinux:latest --memory 8192 --username mwoodpatrick --volume /mnt:/mnt westie-archpodman

also fails, what should the working command line look like?

@stale-locking-app stale-locking-app bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Jul 6, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Jul 6, 2024
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.
Projects
None yet
Development

No branches or pull requests

2 participants