containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
23.56k stars 2.4k forks source link

Default podman-machine image does not mount /dev/bus #14409

Open jedahan opened 2 years ago

jedahan commented 2 years ago

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

I am trying to bring up a docker-compose.yml using podman-machine + podman-compose on an M1 mac running macOS. The compose file looks to mount /dev/bus/usb, but when I podman machine ssh, it seems there is no /dev/bus. How should I setup /dev/bus with the default podman machine image?

Steps to reproduce the issue:

// Observing /dev/bus doesn't exist

  1. podman machine init
  2. podman machine ssh
  3. ls -al /dev/bus

// Try running this docker-compose.yml with podman-compose

  1. git clone https://github.com/flipperdevices/flipperzero-firmware.git && cd flipperzero firmware
  2. podman machine init
  3. podman-compose up --detach

Describe the results you received:

ls: cannot access '/dev/bus': No such file or directory

Describe the results you expected:

Mounted filesystem with usb, or documentation on how to configure a way to mount this.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Client:       Podman Engine
Version:      4.1.0
API Version:  4.1.0
Go Version:   go1.18.1
Built:        Thu May  5 16:07:47 2022
OS/Arch:      darwin/arm64

Server:       Podman Engine
Version:      4.1.0
API Version:  4.1.0
Go Version:   go1.18
Built:        Fri May  6 12:16:38 2022
OS/Arch:      linux/arm64

Output of podman info --debug:

host:
  arch: arm64
  buildahVersion: 1.26.1
  cgroupControllers:
  - cpu
  - io
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.0-2.fc36.aarch64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.0, commit: '
  cpuUtilization:
    idlePercent: 96.79
    systemPercent: 2.09
    userPercent: 1.12
  cpus: 2
  distribution:
    distribution: fedora
    variant: coreos
    version: "36"
  eventLogger: journald
  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: 501
      size: 1
    - container_id: 1
      host_id: 100000
      size: 1000000
  kernel: 5.17.5-300.fc36.aarch64
  linkmode: dynamic
  logDriver: journald
  memFree: 160747520
  memTotal: 2053152768
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: crun-1.4.4-1.fc36.aarch64
    path: /usr/bin/crun
    version: |-
      crun version 1.4.4
      commit: 6521fcc5806f20f6187eb933f9f45130c86da230
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/user/501/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: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.0-0.2.beta.0.fc36.aarch64
    version: |-
      slirp4netns version 1.2.0-beta.0
      commit: 477db14a24ff1a3de3a705e51ca2c4c1fe3dda64
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.3
  swapFree: 0
  swapTotal: 0
  uptime: 28m 50.97s
plugins:
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /var/home/core/.config/containers/storage.conf
  containerStore:
    number: 1
    paused: 0
    running: 1
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /var/home/core/.local/share/containers/storage
  graphRootAllocated: 106825756672
  graphRootUsed: 3648176128
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 1
  runRoot: /run/user/501/containers
  volumePath: /var/home/core/.local/share/containers/storage/volumes
version:
  APIVersion: 4.1.0
  Built: 1651853798
  BuiltTime: Fri May  6 12:16:38 2022
  GitCommit: ""
  GoVersion: go1.18
  Os: linux
  OsArch: linux/arm64
  Version: 4.1.0

Package info (e.g. output of rpm -q podman or apt list podman):

 ▲ brew list podman
/opt/homebrew/Cellar/podman/4.1.0/bin/podman
/opt/homebrew/Cellar/podman/4.1.0/bin/podman-mac-helper
/opt/homebrew/Cellar/podman/4.1.0/bin/podman-remote
/opt/homebrew/Cellar/podman/4.1.0/etc/bash_completion.d/podman
/opt/homebrew/Cellar/podman/4.1.0/libexec/gvproxy
/opt/homebrew/Cellar/podman/4.1.0/share/fish/vendor_completions.d/podman.fish
/opt/homebrew/Cellar/podman/4.1.0/share/man/ (163 files)
/opt/homebrew/Cellar/podman/4.1.0/share/zsh/site-functions/_podman

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

 ▲ uname -a
Darwin scorpius.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64
Luap99 commented 2 years ago

Does this work with docker?

Luap99 commented 2 years ago

@baude @ashley-cui PTAL

rhatdan commented 2 years ago

Have you tried this with docker-compose instead of podman-compose?

Luap99 commented 2 years ago

This has nothing to with compose, it is about getting devices from the host into the machine VM.

github-actions[bot] commented 2 years ago

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

rhatdan commented 2 years ago

@baude @ashley-cui PTAL

github-actions[bot] commented 2 years ago

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

ashley-cui commented 2 years ago

Do you have the docker-compose snippet I can look at? Docker doesn't support USB passthrough AFAIK, if that's what you're looking for.