Open lamw opened 5 years ago
I experienced similar, assuming you used a self-signed certificate on the vSphere Server. I did some testing with Invoke-WebRequest.
Could you try if a web request in PS v6 with the SkipCertificateCheck works?
Invoke-WebRequest -Method Get -Uri https://<vSphere-Server> -SkipCertificateCheck
Without that switch, it should fail with an 'The remote certificate is invalid according to the validation procedure' error.
When you do the same from PS v5.*, the error is more cryptic. It says 'The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel'.
I had tried that IIRC and any other variations to ignore the cert but still same error.
Is anyone working on this? From what I have tested on every Photon 3 install now installing powershell via tdnf results in a completely UNUSABLE BROKEN Powershell install. It all seems to revolve around the same thing - SSL/TLS/Crypto issues from a conflict which now even breaks all the core workings (ie. zero repos/modules installed by default, no command completions, etc.).
@lamw looks like you are using the binaries which are not compiled using the Photon libs and most-probably because of mismatching of libcurl.so.4(CURL_OPENSSL_3) for aarch64, you are getting this issue for aarch64.
@CollinChaffin you are installing Powershell on x86_64, please help us by providing the Steps and Logs for SSL/TLS/Crypto issues on x86_64.
@akaher Any updates on having PowerShell support for Photon AARCH64? I also saw your comment on 9/11 https://github.com/vmware/photon/issues/926#issuecomment-530673327
I was recently experimenting with latest Photon OS 3.0 for the Raspberry Pi 3 and wanted to get PowerShell and PowerCLI running. I found that for the current release of PowerShell, only the 32-Bit image has been published, I found that the upcoming 6.0 Preview 3 includes the 64-Bit version of PowerShell. Once I got that installed, I was able to launch PS on PhotonOS but I hit another issue when trying to connect to VC/ESXi endpoint with the following error: The SSL connection could not be established, see inner exception.
I've also tried running Set-PowerCLIConfiguration -InvalidCertificateAction Ignore but that had no effect.
In any case, below are the instructions in case anyone else was interested:
Step 1 - Install PhotonOS 3 on rPi3
Step 2 - Install required packages
Step 3 - Download PS 6.2 Preview 3 (64-Bit) for rPI and latest PowerCLI 11.1 release:
Step 4 - Run the following commands to setup PS and unzipping the PCLI module:
Step 5 - Launch PS by running:
Step 6 - Attempt to connect to VC/ESXi endpoint using Connect-VIServer cmdlet:
Below is the InnerException and Stacktrace, not sure if these help ...
PS /root> $error[0].exception.InnerException
PS /root> $error[0].exception.StackTrace