-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add support for providing Root CAs to podman machine init #14593
Comments
@n1hility PTAL |
Please can I up-vote this item as I too can't install Podman directly on Windows 10 behind the corporate firewall packet inspection using Zscaler (like the OP). I have a tortuous work-around running a VM under oracle VM Virtual Box and then run podman from there - ouch. What I'd like to achieve is a one click in an IDE on Windows (eclipse or vscode etc) that uses Podman to build the code |
Hi, |
Hi @userid0x0 @AaronRidoutAE @ericis, In the upcoming 4.2 release, we are switching to an image with packages pre-installed, which should make adding your missing certs easier (until we have a specific feature for this). I have a pre-built early version here if you want to try it: Using this release you should be able to do a podman machine init, and then after its created you can access it with wsl (or podman machine ssh if started). At that point you can add the cert + any other changes you need and restart. sha256sum: |
Hi @n1hility ,
-> works fine
A test
If I do the same thing within the WSL podman-machine-default it succeeds. e.g. TL;DR |
I took a log, I have no clue what could be the problem - sorry.
|
@userid0x0 ah yeah, installing as wsl V1 will lead to issues. In a future update, I aim to prevent that. BTW You should not need to do step 4. The proxy settings are picked up on every start now (if set they will be used, if not set they will be cleared) Regarding the registry changes, did you try bouncing the machine (podman machine stop, podman machine start)? Remote requests are handled by a systemd service so the changes to configs can potentially be cached across operations. |
@n1hility Yes, I started/stopped the machine in between - sorry missed that in my description. |
I just want to confirm back that a restart of the workstation did not solve the problem with the internal dockerhub. |
Wireshark was helpful. Interesting to note: I set TL;DR
|
@userid0x0 @n1hility Is this still an issue? |
For me the things work now. Good work guys! Thanks! |
@rorygilfillan-absa do you have any sort of virus scanner running and did it trigger any alerts during the process? |
@n1hility I got the same error. I ran the standard Windows "Unblock", since it was initially blocked from even running because it was "not trusted" (signed). Steps:
Windows 10 Enterprise |
Moving the dev build installer issue to a discussion and closing this one since the main limitation is addressed. Feel free to reopen otherwise |
Not suggesting this needs to be reopened as the combination of getting the cert(s) via curl, copying to /etc/pki/ca-trust/source/anchors/ and then running update-ca-trust worked nicely for me. Just wondering if it's documented somewhere that I have missed. |
@carljmosca Good point. A customized trust setup isn't documented, would you be interested in contributing a section in our windows guide? It's located here: https://github.com/containers/podman/blob/main/docs/tutorials/podman-for-windows.md |
Sure, I can take a look but I did this on macOS ;) |
@carljmosca awesome thanks! and oh good point on mac - hmm maybe it should be a separate md file wdyt? |
yes, I just had the same thought |
Link to installer issue discussion: #15133 |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Related to #14589, our host root CA isn't trusted by the virtual Fedora image. This CA must be installed (no special proxy endpoint setting) in the virtual machine to work properly. The
podman machine init
command successfully downloads the Fedora image and registers it with WSL. I was able to open a new terminal within the image and manually create the CA file to successfully update packages withyum update
. However,podman machine start
fails, because initialization never completed.Would love a way to inject the CA file into the machine during initialization for full automation, or at least a way to "continue" initialization after manually fixing the virtual.
Steps to reproduce the issue:
Install Podman 4.1.0 to Windows 10 Enterprise behind a proxy that installs its own Root CA (e.g. Zscaler) and does not require a custom proxy URL
Run
podman machine init
Note that the
curl
SSL fails with errors, because the Root CA doesn't match what is expected by the proxyRun
wsl --list
to see that "podman-machine-default" was successfully installedOpen a terminal using
wsl --distribution podman-machine-default
Test that connectivity is failing with
yum update
Manually create the CA file (e.g.
cat <<EOT >> ./my.pem ... EOT
, where any file name can be used and the content of the ".pem" CA is pasted into thecat
prompt)Move the CA file to Fedora's trust directory
sudo mv ./my.pem /etc/pki/ca-trust/source/anchors/
Update the CA trust with
sudo update-ca-trust
Test that connectivity now works properly with
yum update
Exit the WSL terminal (e.g.
exit 0
)Attempt to continue the
podman machine init
command and notice that it fails, because the WSL image is already createdAttempt to start podman with the command
podman machine start
and notice that it fails, because podman initialization never completedDescribe the results you received:
The first initialization...
A second attempt to initialize...
An attempt to start...
Describe the results you expected:
Podman allows to continue initialization from where it left off and starts successfully. Ideally,
podman machine init
allows a custom CA file to be installed.Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):n/a Windows with WSL
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.):
Windows 10 Enterprise
The text was updated successfully, but these errors were encountered: