I received a question from Andrea Peetz, asking whether the new Image Builder cmdlets, which is part of the new PowerCLI 13.0 release would work with Photon OS 3.0 (PH3)? After speaking with the PowerCLI team, it looks like Photon OS 3.0 is not compatible with the new cmdlets. If you attempt to use one of the Image Builder cmdlets like Get-EsxSoftwareDepot, you will get the following error:
Unable to cast object of type 'System.IO.FileStream' to type 'System.IO.Pipes.PipeStream'.
While I have not used PH3 for quite some time now, I do use Photon OS 4.0 (PH4) on a regular basis. I was curious if I would have better luck with the new Image Builder cmdlets. Unlike PH3 which ships with Python 3.7, which is the required version for the Image Builder cmdlets, PH4 ships with a newer version of Python which is 3.10 and will not work with PowerCLI. We can still meet this requirement, but we will need to install Python via pyenv.
After a quick test, I was able to get the basic Image Builder cmdlets working and while going through a complete end-to-end workflow to make sure everything was working, I ran into a slightly different issue. When using the Export-EsxImageProfile cmdlet to export an ESXi Image Profile to an ISO file, I got the following error:
Can not instantiate 'certified' policy: VibSign module missing.
Quickly debugging the issue with the PowerCLI team, it looks like the VibSign module that has been compiled has a dependency on OpenSSL 1.1 and PH4 ships with OpenSSL 3.0 by default. Luckily, I was able to find a workaround by building the required file from the latest stable OpenSSL 1.1 release. Once the dependency was fulfilled, I was able successfully complete the Image Builder workflow!
Similiar to PH3, if you do not require the use of the Image Builder cmdlets, PowerCLI 13.0 can be installed on PH4 using the instructions below. If you do need to use the Image Builder cmdlets on PH4, you will need to run Step 2 below as that is a required step. I have also reported both of these issues with the PowerCLI team.