Hello all,
I have a Win 11 machine running Powershell version 5.1.22621 . I've loaded (get-module) all relevant PS modules for VMware and am running v13 of VMware.PowerCLI and v8.0.0.2 of VMware.ImageBuilder.
When attempting to create a custom ISO (injecting nvme drivers), I ran the following from an Administrative PowerShell window : Add-EsxSoftwareDepot .\explicit path to the depot .zip file. This is the error message I receive. I've not found this on any Google search, DuckDuckGo search, PowerShell site, nor VMware site yet.
Add-EsxSoftwareDepot : Could not initialize the VMware.ImageBuilder PowerCLI module. Make sure that Python 3.7 is
installed and that you have set the path to the Python executable by using Set-PowerCLIConfiguration -PythonPath. See
the PowerCLI Compatibility Matrixes for information on the Python requirements.
While I am unable to find any documentation on that specific "-PythonPath" switch, I have attempted to run it with and without an explicit path to the python executable. The only one that does not throw an error is to the explicit executable, which is located in C:\Program Files\Python37, so the command looks like : Set-PowerCLIConfiguration -PythonPath "C:\Program Files\Python37\python.exe"
The result of that operation is :
Scope ProxyPolicy DefaultVIServerMode InvalidCertificateAction DisplayDeprecationWarnings WebOperationTimeout
Seconds
----- ----------- ------------------- ------------------------ -------------------------- -------------------
Session UseSystemProxy Multiple Unset True 300
User
AllUsers
I even tried an older reference to an environmental command : [Environment]::SetEnvironmentVariable("Path", "$env:Path;c:\Program Files\Python37\python.exe"), which throws no response, or result.
Python 3.7 is installed and can be called from the PowerShell command line : Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32. I have tried newer versions of Python, but uninstalled, due to the error specifically calling for 3.7.
Python 3.7 is also in the system environmental variables : PATH=C:\Program Files\Python37\Scripts\;C:\Program Files\Python37\
Has anyone experienced this , or is this a new Windows 11, random "feature" haha. Any help would be immensely appreciated.
Thanks!!!
This post fixed it for me, really appreciate it
It worked for me too.
I followed all the steps here, installed the 4 additional packages and it didn't work.
I closed PowerShell, repeated the steps again, restarted powershell, and it didn't work.
So I closed PowerShell, followed all the steps again, restarted the computer and voilá, all right.
I think anyone with this problem is worth following all the guidelines in this topic and restarting the machine.
Wow, hugs!!
Hi all,
I came across this post while trying to make my own custom ISO for ESXi 6.7 and add a NIC driver (r8168).
After hours of trying and failing with different errors in PowerCLI i found the Image Builder in vCenter that worked a treat and took about 10 minutes from enabling to having my custom ISO ready.
Great article here how to get it done, highly reccommend against trying to battle with PowerCLI
https://4sysops.com/archives/using-esxi-iso-image-builder-with-vmware-vsphere-70-update-2/
Hope this helps someone.
Thanks
Mike
Hola saludos cordiales tengo problemas con el powercli y el vmware.imagebuilder no logro hacer que avance a pesar que segui tus paso y logre instalar las herramientas de Python 37 por favor contactame jhon1207@outlook.es
