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

Machine Start fail in user-mode networking #20982

Closed
Swympy opened this issue Dec 11, 2023 · 8 comments · Fixed by containers/podman-wsl-fedora#19
Closed

Machine Start fail in user-mode networking #20982

Swympy opened this issue Dec 11, 2023 · 8 comments · Fixed by containers/podman-wsl-fedora#19
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. machine windows issue/bug on Windows

Comments

@Swympy
Copy link

Swympy commented Dec 11, 2023

Issue Description

I have created a podman machine with -user-mode-networking via cli, and when I want to start it I have an error for -user-mode networking with exit status 42
PS : I'm in win10 and wsl is up to date

Steps to reproduce the issue

Steps to reproduce the issue

  1. podman machine init --user-mode-networking --rootful
  2. podman machine start

Describe the results you received

podman machine start
Starting machine "podman-machine-default"
Starting user-mode networking...
Error: error setting up user-mode networking: exit status 42

Describe the results you expected

.

podman info output

WSL version: 2.0.9.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.3693

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

No response

Additional information

No response

@Swympy Swympy added the kind/bug Categorizes issue or PR as related to a bug. label Dec 11, 2023
@Swympy Swympy changed the title Machine Start in user-mode networking failed Machine Start fail in user-mode networking Dec 11, 2023
@Luap99 Luap99 added machine windows issue/bug on Windows labels Dec 12, 2023
@benoitf
Copy link
Contributor

benoitf commented Dec 12, 2023

Hello, the issue is in podman-wsl-fedora archive

I created
containers/podman-wsl-fedora#19 to revert the commit introducing the regression

as a workaround, you can download an older rootfs.tar.xz file from https://github.com/containers/podman-wsl-fedora like for example last week https://github.com/containers/podman-wsl-fedora/releases/tag/v38.0.51

then, do podman machine init --user-mode-networking --rootful --image-path .\Downloads\rootfs.tar.xz

@lucasjl
Copy link

lucasjl commented Dec 13, 2023

Hello, the issue is in podman-wsl-fedora archive

I created containers/podman-wsl-fedora#19 to revert the commit introducing the regression

as a workaround, you can download an older rootfs.tar.xz file from https://github.com/containers/podman-wsl-fedora like for example last week https://github.com/containers/podman-wsl-fedora/releases/tag/v38.0.51

then, do podman machine init --user-mode-networking --rootful --image-path .\Downloads\rootfs.tar.xz

Thank you for the quick reply! However, unfortunately I still get the same error even after downloading the suggested file from last week (https://github.com/containers/podman-wsl-fedora/releases/tag/v38.0.51) and running podman machine init --user-mode-networking --rootful --image-path .\Downloads\rootfs.tar.xz

I do get the message that the machine init was completed (as usual), but after podman machine start I get the same logs:

Starting machine "podman-machine-default"
Starting user-mode networking...
Error: error setting up user-mode networking: exit status 42

This is for a Windows machine, so I'm running it from CMD in Windows. When installing Podman I did end up installing Ubuntu as well together with the WSL2 download requirements, but after reading the docs it looks like I should be able to run Podman commands from Windows CMD without problems. If my assumption is wrong, please let me know.

I'm using WSL 2.0.14.0 and Podman version 4.8.2.

Thank you!

@benoitf
Copy link
Contributor

benoitf commented Dec 13, 2023

@lucasjl you need to do first: wsl --unregister podman-net-usermode

@grgghrn
Copy link

grgghrn commented Dec 13, 2023

I ran into the same issue, and finding @lucasjl 's ticket from 7 hours previous, figured it couldn't be a coincidence and tried purging and rolling back to 4.7.2 and recreating the machine's and the problem didn't go away. I'm pretty sure it worked when we first tried it last week on 4.7.2 though, and I had unregistered and recreated all podman WSL instances when I tried rolling back.

I did notice on the podman-net-usermod WSL instance, that in /var/log there was "vm.err" that would appear as soon as I tried to start up the main podman machine. It was because it did not have execute permission on the app/command 'vm'. So maybe my issues is related to rootless or some other permission config, as this is my first time using podman and am still not clear on that aspect.

@n1hility
Copy link
Member

@grgghrn can you run wsl --unregister podman-net-usermode and then recreate the vm it should fix the issue

@grgghrn
Copy link

grgghrn commented Dec 13, 2023

I had to do a podman machine rm first, otherwise it kept saying the machine still exists when I try to init again, but beyond that, it does seem to be working (still rolled back to 4.7.2). I tried it rootless and --rootful and seems to work either way too.

Not sure what I did differently when I tried rolling back at first, but must have missed something. I'm in no rush, I will stick with 4.7.2 and wait for the next release with your fix in it.

Thank you!

@lucasjl
Copy link

lucasjl commented Dec 13, 2023

@lucasjl you need to do first: wsl --unregister podman-net-usermode

It worked now. Thank you so much for the quick and efficient help!

As recommended by @benoitf I was able to make it work by getting an older version of rootfs.tar.xz on https://github.com/containers/podman-wsl-fedora/releases/tag/v38.0.51 and then applying these commands on CMD:

wsl --unregister podman-net-usermode

podman machine init --user-mode-networking --rootful --image-path .\Downloads\rootfs.tar.xz

podman machine start

@n1hility
Copy link
Member

n1hility commented Dec 14, 2023

@lucasjl @grgghrn you don't have to wait for an updated podman release. A corrected image (v39.0.4) was pushed yesterday, which is pulled by all versions of podman during a new podman machine init. You just need to make sure that you remove any existing podman-net-usermode dist (wsl --unregister podman-net-usermode, along with your podman machine podman machine rm). Future releases of podman (after #21014 is merged) will automatically detect and correct this condition.

@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 Mar 13, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 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. machine windows issue/bug on Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants