on a fresh installation of podman on windows, podman is unable to pull image because of timeout error. But if i ssh into the podman machine and try to pull the same image, it works. How do you solve this problem ?
Assistant
This problem often happens because the Podman client on Windows communicates with the Podman service running inside a Linux virtual machine (VM), and network or proxy issues prevent the Windows host from directly pulling images, but pulling inside the VM works fine.
Explanation:
On Windows, Podman runs inside a VM (podman machine) because Podman uses Linux-specific features.
When you run podman pull from Windows, it communicates with the Podman service inside the VM via a REST API.
The VM has internet access and can pull images fine inside its shell (via podman machine ssh).
If the Windows client times out pulling images, it’s often an issue with:
How the Windows host DNS or firewall handles requests,
The Podman socket isn’t forwarding requests properly,
Or there’s a misconfiguration in the Podman environment.
How to Solve the Timeout Issue:
Ensure Podman VM is Running and Updated
Make sure your Podman machine is running:
bash
podman machine start
If not, create or start it.
Use the Proper Podman Context / Environment
When running Podman commands on Windows, make sure to connect to the Podman service inside the VM properly.
Typically, Windows Podman configures the connection via podman.exe transparently, but check the environment:
powershell
podman system connection ls
To connect to the podman machine:
powershell
podman system connection add podman-machine ssh://username@localhost:22/run/podman/podman.sock
podman system connection default podman-machine
(Update username and socket path as per your configuration.)
Check Network/Proxy Settings
Sometimes corporate firewalls or proxies interfere with network access.
Configure Podman inside the VM to use the proxy if required.
Ensure DNS resolution works inside the VM (ping docker.io inside podman machine ssh).
On the Windows host, check firewall rules that may block the Podman socket communication or image pull requests.
Try Pulling Using Podman Inside the VM
Since it works inside, a workaround is to pull the image from within the VM and then the images will be available to the Podman client.
Update Podman to the Latest Version
Some versions of Podman on Windows have known bugs related to network and proxy.
Restart the Podman Machine
Sometimes a restart fixes transient network or socket issues:
bash
podman machine stop
podman machine start
Check Podman Machine’s Network Configuration
There can be issues with the VM's network configuration.
Run inside the VM (podman machine ssh):
bash
sudo nmcli device status
sudo nmcli connection show
Make sure the network adapter is correctly set up.
Summary
Confirm the Podman machine is started.
Ensure Windows Podman client communicates correctly with the Podman VM.
Pull images from inside the VM if external pull times out.
Validate network and proxy settings inside VM and host.
Restart or recreate the Podman machine if necessary.
If all else fails, alternatively, you can:
Manually pull images inside the VM and export/import them.
Consider reinstalling Podman or switching to Docker Desktop for Windows with WSL2 backend, which integrates differently.
If you want, I can help you with exact commands based on your setup or check/debug the logs.