podman: Cannot resolve mirrors.fedoraproject.org Windows machine init
BUG REPORT
/kind bug
Windows podman machine init after podman-4.0.2.msi install has an error. " - Curl error (6): Couldn’t resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-35&arch=x86_64".
Steps to reproduce the issue:
-
Install WSL2
-
Install podman-4.0.2.msi
-
Run podman machine init using the Command Prompt.
C:>podman machine init Extracting compressed file Importing operating system into WSL (this may take 5+ minutes on a new WSL install)… Installing packages (this will take awhile)… Failed to set locale, defaulting to C.UTF-8 Fedora 35 - x86_64 0.0 B/s | 0 B 02:00 Errors during downloading metadata for repository ‘fedora’:
- Curl error (6): Couldn’t resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-35&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org] Error: Failed to download metadata for repo ‘fedora’: Cannot prepare internal mirrorlist: Curl error (6): Couldn’t resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-35&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org] Error: package upgrade on guest OS failed: exit status 1
Expected it to run without error.
I was connected to the internet and able to resolve curl 1.1.1.1 along with mirrors.fedoraproject.org in a web browser.
>podman version
Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM
Error: unable to connect to Podman socket: Get "http://d/v4.0.2/libpod/_ping": dial unix ///run/podman/podman.sock: connect: An invalid argument was supplied.
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
Windows 10 latest stable updated WSL2
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (8 by maintainers)
Ok so avoid previous comment. I figured out the problem has to do with wsl version 2. I made the downgrade to version 1 and connection to internet seems to work fine.
Keeping all this info for the record, just in case someone comes with the same problem as me
WSL 2 was confirmed the issue for myself as well
The following commands should get it to work
@AddictArts ah glad to hear it’s working now. The bogus warning you mentioned was recently fixed, and will be in the next release:
https://github.com/containers/common/pull/951
If it bothers you, you should be able to edit your containers conf and manually set it to the windows temp folder