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 fedora 31 wsl 2 #67

Closed
ghost opened this issue Jan 29, 2020 · 16 comments
Closed

podman fedora 31 wsl 2 #67

ghost opened this issue Jan 29, 2020 · 16 comments
Labels
answered how-to-candidate Candidate to be included in the How-to page

Comments

@ghost
Copy link

ghost commented Jan 29, 2020

Is your feature request related to a problem? Please describe.
Podman not working in fedora 31, wsl2, arm64

Describe the solution you'd like
I want to run toolbox in fedora 31.

Describe alternatives you've considered
Use my old Workstation -- works, but I can't carry it around like my surface pro x (arm64), it is loud an it eats needlessly much energy.

Additional context
After fresh Install of fedoraremix I did:

$ sudo dnf install toolbox buildah

Runs without errors. But it seems to edit /usr/lib/os-release, and forgets to quote The Name-String, hence the bash-warning "command not found", but that's not the problem, the problem is afterwards:

$ toolbox create
/usr/lib/os-release: line 1: Remix: command not found
toolbox: unable to migrate containers: Podman version couldn't be read
[stefan@DESKTOP-DQ1936J ~]$ toolbox -v create
toolbox: running as real user ID 1000
toolbox: resolved absolute path for /usr/bin/toolbox to /usr/bin/toolbox
toolbox: checking if /etc/subgid and /etc/subuid have entries for user stefan  toolbox: TOOLBOX_PATH is /usr/bin/toolbox
toolbox: running on a cgroups v1 host
Error: could not get runtime: error generating default config from memory: cannot mkdir /run/user/1000/libpod: mkdir /run/user/1000/libpod: no such file or directory
toolbox: unable to migrate containers: Podman version couldn't be read

Does it matter that it's a cgroups v1 host?
Trying as root:

# toolbox -v create
toolbox: running as real user ID 0
toolbox: resolved absolute path for /usr/bin/toolbox to /usr/bin/toolbox
toolbox: TOOLBOX_PATH is /usr/bin/toolbox
toolbox: running on a cgroups v1 host
toolbox: current Podman version is 1.7.0
toolbox: migration not needed: Podman version 1.7.0 is unchanged
toolbox: Fedora generational core is f30
toolbox: base image is fedora-toolbox:30
toolbox: container is fedora-toolbox-30
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
toolbox: failed to use 'systemctl show'
toolbox: parsing value  of property Listen in sssd-kcm.socket
toolbox: checking if 'podman create' supports --ulimit host
<standard input>:703: warning [p 12, 7.8i]: cannot adjust line
<standard input>:704: warning [p 12, 8.0i]: cannot adjust line
toolbox: 'podman create' supports --ulimit host
toolbox: looking for image localhost/fedora-toolbox:30
toolbox: looking for image registry.fedoraproject.org/f30/fedora-toolbox:30
Image required to create toolbox container.
Download registry.fedoraproject.org/f30/fedora-toolbox:30 (500MB)? [y/N]: y
toolbox: pulling image registry.fedoraproject.org/f30/fedora-toolbox:30
Trying to pull registry.fedoraproject.org/f30/fedora-toolbox:30...
  no image found in manifest list for architecture arm64, OS linux
Error: error pulling image "registry.fedoraproject.org/f30/fedora-toolbox:30": unable to pull registry.fedoraproject.org/f30/fedora-toolbox:30: unable to pull image: Error choosing an image from manifest list docker://registry.fedoraproject.org/f30/fedora-toolbox:30: no image found in manifest list for architecture arm64, OS linux
toolbox: failed to pull base image fedora-toolbox:30

I wonder why it even looks for 30, and then simply tried podman directly with something which exists for arm64:

# podman pull registry.access.redhat.com/ubi7/ubi:latest
Trying to pull registry.access.redhat.com/ubi7/ubi:latest...
  no image found in manifest list for architecture arm64, OS linux
Error: error pulling image "registry.access.redhat.com/ubi7/ubi:latest": unable to pull registry.access.redhat.com/ubi7/ubi:latest: unable to pull image: Error choosing an image from manifest list docker://registry.access.redhat.com/ubi7/ubi:latest: no image found in manifest list for architecture arm64, OS linux  [root@DESKTOP-DQ1936J stefan]# podman run -it ubuntu bash
Trying to pull docker.io/library/ubuntu...
Getting image source signatures
Copying blob fbdcf4a939bd done
Copying blob 4cf5b492942e done
Copying blob 7799262edbd8 done
Copying blob d3463cc4abcf done
Copying config db472617b3 done
Writing manifest to image destination
Storing signatures
ERRO[0019] unable to write pod event: "write unixgram @00022->/run/systemd/journal/socket: sendmsg: no such file or directory"
Error: cannot open sd-bus: No such file or directory: OCI runtime command not found error

Seems like podman needs systemd? I don't know for sure if it is doable at all, but it would be very cool to get this running.

@crramirez
Copy link
Contributor

OK we will check.

Thank you for reporting

@crramirez
Copy link
Contributor

Hello,

Run this script sudo sed -i 's/^\(NAME=\)\(.*\)$/\1"\2"/' /usr/lib/os-release .

This will fix the os-release problem.

Although as I saw podman is something that works with containers and systemd. This unlikely will work with WSL1. I did some tests with WSL 2 and looks better but still have problems with dbus.

Later this week I can investigate it further to see if we can make it run on WSL.

Regards,
Carlos

@crramirez crramirez added bug Something isn't working testing labels Feb 4, 2020
@thoraxe
Copy link

thoraxe commented May 11, 2020

Hi there --

I'm also experiencing this issue. Can you let me know if there's anything I can do to help troubleshoot, @crramirez ?

@crramirez
Copy link
Contributor

We haven't been able to run it WSL2 still. We'll keep you informed

@crramirez crramirez added the help wanted Extra attention is needed label Jun 2, 2020
@jpeeler
Copy link

jpeeler commented Jun 4, 2020

This should be helpful: https://www.redhat.com/sysadmin/podman-windows-wsl2 (just follow the libpod.conf part)

For toolbox, XDG_RUNTIME_DIR is not set and the directory doesn't exist:

export XDG_RUNTIME_DIR=/run/user/1000
mkdir /run/user/1000
chown <user>:<user> /run/user/1000

I modified toolbox (it's a bash script for now) to not execute gdbus. That got me as far as toolbox create trying to execute podman, but failing with a return code of 125. I didn't try to debug this massive command line, but hopefully all this helps you get really close: https://github.com/containers/toolbox/blob/7b460e390d7e5f8a90038c9d0f03a56dc622bd1c/toolbox#L1078.

@christianh814
Copy link

I was able to get podman to work (rootless and rootful) on Feodra 33 WSL2, following these two articles:

https://fedoramagazine.org/wsl-fedora-33/
https://dev.to/bowmanjd/using-podman-on-windows-subsystem-for-linux-wsl-58ji

@crramirez
Copy link
Contributor

Excellent thanks a lot. We will test this approach and make a how-to guide

@gbraad
Copy link

gbraad commented Feb 18, 2021

Recent versions of Podman, on F33 can run with the following commands:

containers/podman#3288 (comment)

$ sudo -i
$ cp /usr/share/containers/containers.conf /etc/containers/containers.conf && \
 sed -i '/^# cgroup_manager = "systemd"/ a cgroup_manager = "cgroupfs"' /etc/containers/containers.conf && \
 sed -i '/^# events_logger = "journald"/ a events_logger = "file"' /etc/containers/containers.conf
$ dnf reinstall -y shadow-utils

Now podman should work without issues

@jpeeler
Copy link

jpeeler commented Feb 18, 2021

Neat, I'm glad you commented here. I was having some difficulties due to what appears to be a truncated socket path:

$ podman run -it docker.io/library/alpine:latest /bin/sh
Error: failed to connect to container's attach socket: /tmp/jpeeler-runtime/libpod/tmp/socket/8763c0add8b1c2af5cb9bff38d22e6273af08e4149ed1d574ad31ef3319c94f0/att: dial unixpacket /tmp/jpeeler-runtime/libpod/tmp/socket/8763c0add8b1c2af5cb9bff38d22e6273af08e4149ed1d574ad31ef3319c94f0/att: connect: no such file or directory

I believe this is the fix, but it's only present in podman 3, which seems to only be in the testing repo currently. But if anybody else sees the same thing, hopefully an upgrade fixes the issue like it did for me:

sudo dnf --enablerepo=updates-testing update podman

@gbraad
Copy link

gbraad commented Feb 18, 2021

@jpeeler I am at the moment not using Podman 3.0; as I am focused on our build on the EL8 platform. So at the moment not much in a hurry to enable this on Fedora. But will certainly enable/update this when the need is there.

@gbraad
Copy link

gbraad commented Feb 18, 2021

I think this can be closed. Besides F31 is EOL since 2020-11-24 anyway. /cc: @ghost
If issues exist with any newer release filing a new issue would be a better idea.

@crramirez crramirez added answered how-to-candidate Candidate to be included in the How-to page and removed bug Something isn't working help wanted Extra attention is needed testing labels Feb 18, 2021
@christianh814
Copy link

Actually, we should keep this open until it's properly documented.

@gbraad
Copy link

gbraad commented Feb 19, 2021

In that case please modify the title, as this is not indicative of the intent

@anthr76
Copy link

anthr76 commented Sep 2, 2021

I see dbus is installed but I don't have XDG_* vars. I'm also trying to use toolbox and podman

@returntrip
Copy link

returntrip commented Mar 10, 2023

I think this can be closed. I can run podman, toolbox, distrobox on fedoraremix37

[returntrip]W5CG2241T4G in [⛵tc4-02-admin@tc4-02]~ as 🧙
❯❯ toolbox enter fedora-toolbox-37
bash: starship: command not found
⬢[returntrip@toolbox ~]$ cat /etc/os-release
NAME="Fedora Linux"
VERSION="37 (Container Image)"
ID=fedora
VERSION_ID=37
VERSION_CODENAME=""
PLATFORM_ID="platform:f37"
PRETTY_NAME="Fedora Linux 37 (Container Image)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:37"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f37/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=37
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=37
SUPPORT_END=2023-11-14
VARIANT="Container Image"
VARIANT_ID=container
⬢[returntrip@toolbox ~]$ exit
[ble: exit]

[returntrip]W5CG2241T4G in [⛵tc4-02-admin@tc4-02]~ as 🧙 [⏱ 10s]
❯❯ cat /etc/os-release
NAME="Fedora Remix for WSL"
VERSION="37"
ID=fedoraremixforwsl
ID_LIKE=fedora
VERSION_ID=37
PLATFORM_ID="platform:f37"
PRETTY_NAME="Fedora Remix for WSL"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:fedoraproject:fedora:37"
HOME_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL"
SUPPORT_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL"
BUG_REPORT_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/issues"
PRIVACY_POLICY_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/blob/master/PRIVACY.md"
FEDORA_REMIX_VERSION=37.0.2

@crramirez
Copy link
Contributor

Excellent. Thank you for testing and telling us

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered how-to-candidate Candidate to be included in the How-to page
Projects
None yet
Development

No branches or pull requests

7 participants