podman-desktop icon indicating copy to clipboard operation
podman-desktop copied to clipboard

Create a Podman machine doesn't support proxy?

Open OZZlE opened this issue 10 months ago • 1 comments

Bug description

Error: Command execution failed with exit code 125 Command execution failed with exit code 125 Error: head request failed: https://github.com/containers/podman-machine-wsl-os/releases/latest/download: Head "https://github.com/containers/podman-machine-wsl-os/releases/latest/download/5.0-rootfs-amd64.tar.zst": Method Not Allowed

Our company doesn't allow anything to be downloaded without using our http proxy

Operating system

Windows 11

Installation Method

Installer from website/GitHub releases

Version

1.9.0

Steps to reproduce

Create podman machine, 1 cpu, 2gb memory, 40gb hd, root enabled, start machine now: yes + create

Relevant log output

Error: head request failed: https://github.com/containers/podman-machine-wsl-os/releases/latest/download: Head "https://github.com/containers/podman-machine-wsl-os/releases/latest/download/5.0-rootfs-amd64.tar.zst": Method Not Allowed

Command execution failed with exit code 125
Command execution failed with exit code 125
Error: head request failed: https://github.com/containers/podman-machine-wsl-os/releases/latest/download: Head "https://github.com/containers/podman-machine-wsl-os/releases/latest/download/5.0-rootfs-amd64.tar.zst": Method Not Allowed

Additional context

I added proxy pac file link under the Proxy tab but it doesn't seem to use it in this process

OZZlE avatar Apr 19 '24 08:04 OZZlE

Testing on my machine by setting some unreachable proxies (http://127.1.1.1 and https://127.1.1.1), I can see that the proxy settings are correctly passed to the podman process, as the command podman machine init process fails with the error:

Looking up Podman Machine image at quay.io/podman/machine-os:5.0 to create VM

Error: pinging container registry quay.io: Get "http://quay.io/v2/": proxyconnect tcp: dial tcp 127.1.1.1:80: i/o timeout

Command execution failed with exit code 125
Command execution failed with exit code 125
Error: pinging container registry quay.io: Get "http://quay.io/v2/": proxyconnect tcp: dial tcp 127.1.1.1:80: i/o timeout

@OZZlE could you please test this command from a terminal, with the HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment variables set with your proxy settings, to check if the error really comes from the podman cli:

podman machine init

feloy avatar Apr 30 '24 07:04 feloy

Tried to replicate on my Win machine by setting Fiddler to act as the main proxy that intercepts all calls and Desktop seems to respect it correctly. If the proxy is set fine, it works. If it is broken Desktop displays the expected error. E.g. image

lstocchi avatar May 06 '24 08:05 lstocchi

@OZZlE It seems to me that the proxy of your company is blocking all HEAD HTTP requests, but podman machine command uses this kind of request for installing a new machine (https://github.com/containers/podman/blob/main/pkg/machine/wsl/fedora.go#L62)

feloy avatar May 06 '24 09:05 feloy

usage of the airgapped binary might be a workaround as the machine file is inside the desktop binary

benoitf avatar May 06 '24 11:05 benoitf

I'm closing this issue. @OZZlE feel free to re-open it if the propositions in the issues are not fixing the issue on your side

feloy avatar May 14 '24 15:05 feloy