Open jailohani opened 6 months ago
Does the pipeline user have permissions to use WSL?
Yes, when we login as the same user, both WSL and podman commands work. Could there be an issue in the commands being run as a background service?
Same here. Cannot autostart podman at boot: Error: fork/exec C:\Users\user\AppData\Local\Microsoft\WindowsApps\wsl.exe: The file cannot be accessed by the system. It runs correctly in normal session but cannot run when started via TaskScheduler or as a service. I tried to start it with nssm.exe as adviced to autorun a docker. When I run two commands:
wsl --exec whoami >log
podman machine start >>log
then I can see that wsl runs correctly (output: user.) but "podman machine start" fails. WSL version: WSL: 2.2.4.0 Windows Server 2022
i have the sane issue
I face the same issue trying to run podman machine init using ansible, I also received an error like this Error: fork/exec C:\Users\myuser\AppData\Local\Microsoft\WindowsApps\wsl.exe: The file cannot be accessed by the system
However the path doesn't exist on the remote windows instance when I rdp into it and check.
The weird thing is RDPing into the machine and running podman machine init manually does not throw an error :P
I have same issue too...
The file is available on error message path and access check is valid on the windows service account:
Issue Description
Need to run a CI Pipeline on a windows self-hosted agent where Podman is installed. At the start of the pipeline, need to start the Podman machine using the command "podman machine start", so that the subsequent build and push commands can be run.
The command works without issue when run manually, but fails when run by the pipeline.
Error Message- Error: fork/exec C:\Users\myuser\AppData\Local\Microsoft\WindowsApps\wsl.exe: The file cannot be accessed by the system.
The agent runs as a service with the username myuser for log on. Tried giving permissions to myuser for that folder using the following but was unsuccessful in resolving the issue:
icacls "C:\Users\myuser\AppData\Local\Microsoft\WindowsApps\wsl.exe" /grant myuser:F /T
Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
Error: fork/exec C:\Users\myuser\AppData\Local\Microsoft\WindowsApps\wsl.exe: The file cannot be accessed by the system
Describe the results you expected
Podman machine should start successfully.
podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
Windows Self Hosted Agent Specs:
Edition Windows Server 2022 Datacenter Version 21H2 Installed on 3/3/2023 OS build 20348.2402
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting