Currently there is no resolution.
Workaround:
Follow the below mentioned steps:Workaround 1:Configure a separate instance of Python that does not have the pyVmomi module installed. Use this instance for work with VMware.ImageBuilder.
Workaround 2:When the PYTHONPATH environment variable is set, Python prioritizes paths specified in that variable when loading modules. We can set its value to the proper location to allow the Python VMware.ImageBuilder to configure to work with loading the correct pyVmomi version.
Follow the below steps :1. Find the location of PowerCLI modules.
1.1 Start a PowerShell instance.
1.2 Print the contents of the PSModulePath variable by executing
"echo $env:PSModulePath"
1.3 Inspect the locations from step 1.2 and find the module that has VMware.ImageBuilder directory.
2. Prior to importing or executing VMware.ImageBuilder cmdlets, execute
"$env:PYTHONPATH=<location-of-local-pyVmomi>"Steps on how to build the
<location-of-local-pyVmomi> path needed in step 2:
Format:
<powercli-directory>/VMware.ImageBuilder/<version>/<dotnet-framework>/server/<python-version>
<powercli-directory> - acquired on step 1 above.
<version> - There might be a couple of versions of VMware.ImageBuilder in the VMware.ImageBuilder directory when several PowerCLI versions are installed on the same machine. Select the desired one, which would usually be the latest one.
<dotnet-framework>1) Mac/Linux - netcoreapp3.1
2) Windows
2.1) PowerCLI 13.1 - net472
2.2) PowerCLI 13.0 - net45
<python-version>1) PowerCLI 13.0 - empty.
2) PowerCLI 13.1- Find the version of Python that VMware.ImageBuilder is configured to work with and substitute this field with
python-<major-version><minor-version>.
Example: Python version 3.7 - The field has the value python-37.