-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Error using podman cp
on Windows
#14862
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
Comments
@n1hility PTAL |
Hi @PlaidPhantom I'll put this on my TODO to add support for. In the meantime as a workaround you can access your windows drive through the mount that is on the wsl linux host, using unix path conventions, like this:
|
Thanks that worked for my need right now. |
@n1hility I can't get the workaround to work. |
@n1hility |
Hi @dancohen21, I tried to run container (new one) inside wsl and it worked. |
I'm running Win 10 Enterprise 20H2. upgraded to the v4.2.0 release. installed with the podman-v4.2.0.msi windows MSI. I couldn't be more happy with the direction here with the Remote tools executing in WSL container. I'm building a local container from opensuse/leap. which has worked well in the past. I'm having issues with 'podman cp' command. Also, I've discovered that 'bash -c' works well, but 'wsl -d <wsl_machine> --exec' does not work at all running podman commands (stepping into the wsl machine and executing podman commands). I found a series of commands to support my workflow at the moment. However after getting everything working, its running well for ~30 seconds and starts crawling. Which is very unexpected. On a prior machine using wsl + podman (without the windows installer) I didn't have any issues with performance. In fact, the execution in the podman container was faster than in native windows (python app). I'll wait for a few releases and then give it another try from scratch. Seems like there is active development / improvements. Very grateful to everyone working on these projects. |
@dancohen21 Sorry for the delay on fixing cp, I'll bump it up higher on my queue. BUT, if there are problems accessing the drive that would be problematic for a fix there to work. if you enter the wsl host using wsl, do you see a /mnt/c but not a /mnt/d ? Does it help if you do a forced shutdown:
Regarding running direct commands from WSL, you need to use the Here is some examples: Rootful
Rootless
|
@n1hility super helpful. Thanks for the clarification. I will experiment with the enterns shell wrapper. My googling did not uncover this. I see where this is documented now: https://github.com/containers/podman/blob/main/docs/tutorials/podman-for-windows.md any thoughts on how I can track down why my python app starts crawling in the podman container but runs normally in native python in windows? and if this is out of scope, no worries. |
@dancohen21 ok interesting if the mounts are there that cp command should then work from windows. I'm not yet sure why it's not. Does it work from the interactive wsl prompt ( vs the direct command - e.g. As to performance, is there any chance that python app is doing a lot of FS activity against a windows drive path? The bridge layer over plan 9 is not as fast as the virtual ext partition used by the local linux FS. If you need to monitor a win location, one example case where plan 9 can struggle is directories with a large number of entries. If you have a temp folder that has lots of churn that could explain why it was fast before and slower now. |
@n1hility |
@n1hility this command works. It runs from the context of the podman-machine-default. this command is not working. running from the remote podman tools in windows proper context this command is not working either: nor Is there a syntax I'm missing? |
We have podman desktop version 4.3.0 and have this error " error rewriting "C:\XXX\XXX" to be relative to "/": expected root directory to be an absolute path, got "/" ".
How can i do to make it work? |
@miguele |
@dancohen21
Apparently it copies the files because there is no error, but when on the next line it tries to run the 001.CREATE_BASE.sql script that it should have copied, it can't find it. It doesn't seem to fail, but it doesn't copy the content. I've checked the path and I'm sure the script is there |
"Prefixing"
|
Simple workaround for me is to use
|
why not fix it instead of using any workaround?? |
PRs welcome. |
I've been using the wsl copy workaround for a while now but I've recently upgraded to Podman Desktop v1.15.0 and Podman v5.3.1 and for some reason it's stopped worked and I get the error "Error: container "sql_server_2017" does not exist"
I'm certain I have the "sql_server_2017" container running because I can see it running in Podman Desktop. I also tried running
Not exactly sure what to try next or how to debug this. Edit: I was able to get everything working by...
Then I was able to run the wsl command in windows cmd. Running in windows bash didn't work. |
I think this issue makes it pretty much impossible to copy files over to the container if WSL (which allows the |
any news @n1hility ? |
Fixes: containers#14862 Signed-off-by: David Negstad <[email protected]>
Fixes: containers#14862 Signed-off-by: David Negstad <[email protected]>
Fixes: containers#14862 Signed-off-by: David Negstad <[email protected]>
Fixes: containers#14862 Signed-off-by: David Negstad <[email protected]>
Fixes: containers#14862 Signed-off-by: David Negstad <[email protected]>
Great thanks |
Fixes: containers#14862 Signed-off-by: David Negstad <[email protected]>
After all the workarounds suggested here failed, I simply hosted my files using a simple python http server. And wget from inside the container. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
I have a fresh install of podman on Windows 10 & WSL2 with a couple of containers installed and running, and I'm getting a strange error message when I try to copy a file into a container using
podman cp
:Additional information you deem important (e.g. issue happens only occasionally):
FWIW I'll note that I initially attempted this using an MSYS2 shell, but I'm fairly confident that's not an issue as I've also gotten this error through both Command Prompt and Powershell. The above example was pulled from Command Prompt (and then anonymized, of course).
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):New install via podman-v4.1.1.msi
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.):
As stated, Windows 10 / WSL 2
The text was updated successfully, but these errors were encountered: