Hi,
I would like to export depot to iso. So, I do "export-esximageprofile -imageprofile Community -exporttoiso -filepath 'ESXi-6.5-Custom_r8168_al.iso' -nosignaturecheck -Force". But I receive error like this:
export-esximageprofile : Error retrieving file for VIB 'VMW_bootbank_shim-vmklinux-9-2-3-0_6.5.0-0.0.4564106': ('vib20/shim-vmklinux-9-2-3-0/VMW_bootbank_shim-vmklinux-9-2-3-0_6.5.0-0.0.4564106.vib', "Unable to open VIB archive in streaming mode: '_SharedFile' object
has no attribute 'writing'").
At line:1 char:1
+ export-esximageprofile -imageprofile Community -exporttoiso -filepath ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Export-EsxImageProfile], FaultException
+ FullyQualifiedErrorId : System.ServiceModel.FaultException,VMware.ImageBuilder.Commands.ExportProfile
What is wrong? How can I resolve this problem?
Hi everyone,
I solved this issue downgrading the VMware.ImageBuilder module. I realized that installing an older version of powercli kept the latest version of this module, which after all is the one that performs the exportation. So I installed an older version of the VMware.ImageBuilder module and simply remove the last version from the modules directory, then I tried the exportation again and it worked.
I hope this help.
This looks to be same issue as reported here https://communities.vmware.com/t5/ESXi-Discussions/Custom-ISO-fails-at-Export-ESXImageProfile-with-a...
Are you also using PowerCLI 13 or earlier version?
PowerCLI 13
I thought that Problem was in PowerCLI 13 but now looks somewhere deeper
Yes, error is not just when exporting image. Find the error on the picture below.
ew-EsxImageProfile : Cannot process argument transformation on parameter 'CloneProfile'. No image profile has a name
that matches 'ESXi-8.0-20513097-standard'. You may want to use the Get-EsxImageProfile cmdlet to search for an image
profile.
At line:1 char:35
+ ... ew-EsxImageProfile -CloneProfile "ESXi-8.0-20513097-standard" -Name " ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [New-EsxImageProfile], ParameterBindingArgumentTransformationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,VMware.ImageBuilder.Commands.NewImageProfile
I hope it will be fixed soon
Hi everyone,
I solved this issue downgrading the VMware.ImageBuilder module. I realized that installing an older version of powercli kept the latest version of this module, which after all is the one that performs the exportation. So I installed an older version of the VMware.ImageBuilder module and simply remove the last version from the modules directory, then I tried the exportation again and it worked.
I hope this help.
Also hitting this issue. Would be good to get it fixed soon.....
Hello,
I solved it by installing PowerCLI version 12.7 and deleting powerCLI 13.0, but just for vmware 7. For vmware vsphere 8 it still doesnt work.
Carlos29 -> Yes. It helped. Thank you.
1. For ESXi 8, you can export the image profile with -ExportToBundle switch then you will have to install vCenter 8 and go to Home --> Auto Deploy --> Enable Image Builder --> Software Depots.
Import the zip file that you created.
Click on export. Leave everything default and export the iso.
Secondly, if you want to export image profile using -ExportToISO switch then you must have Python version 3.7.9 instead of 3.7.0 once you installed python 3.7.9 then ImageBuilder will also export the iso as well.
Good Job. Really Appreciated👏
..just the PhD (Push here Dummy) step-by-step of carlos29 workaround..
PS Run: Get-Module VMware.ImageBuilder | Uninstall-Module -Force
- navigate to the PowerShell install directory - (C:\Program Files\WindowsPowerShell\Modules\VMware.ImageBuilder) - and delete everything in that directory.
PS Run: Install-Module -Name VMware.ImageBuilder -RequiredVersion 7.0.3.19599828
Tested these steps to downgrade the Vmware.Imagebuilder and re-ran the ExportToISO without any errors.
Would you please to correct your answer.
The first command is missing a mandatory switch -ListAvailable.
Without -ListAvailable the Get-Module returns only currently loaded modules.
In the case you started powershell just right now the command will return nothing (empty list) resulting in no modules will be uninstalled.
Get-Module -ListAvailable VMware.ImageBuilder | Uninstall-Module -Force
Install-Module -Name VMware.ImageBuilder -RequiredVersion 7.0.3.19599828
Also note that it is not sufficient to downgrade only the VMware.ImageBuilder module.
There is a dependent module called VMware.DeployAutomation.
If you'll try to use ImageBuilder without downgrading all dependent modules you'll get an error from PowerCLI notifying you about dependency issues.
To downgrade all dependent modules (from 8.x to 7.x, alternate numeration used, don't mess with PowerCLI version numeration) use the following command:
Get-Module -ListAvailable VMware* | where { ($_.RequiredModules.Name -contains 'VMware.ImageBuilder') -and ($_.RequiredModules.Version -like '8.*') } | foreach { Uninstall-Module $_.Name -Force; Install-Module $_.Name -MaximumVersion "7.9.9" }
In case of errors just downgrade the VMware.DeployAutomation module only:
"VMware.DeployAutomation" | foreach { Get-Module -ListAvailable $_ | where { $_.Version -Like "8.*" } | Uninstall-Module -Force ; Install-Module $_ -MaximumVersion "7.9.9" }
After downgrade feel free to verify resulted module versions (should be 7.0.3.19599828):
Get-Module -ListAvailable VMware.ImageBuilder | ft Name,Version -AutoSize
Get-Module -ListAvailable VMware.DeployAutomation | ft Name,Version -AutoSize
But most of the people are reporting that this is a Python-related issue.
To resolve the issue just upgrade Python from 3.7.0 to 3.7.9 and reinstall PIP and 'six psutil lxml pyopenssl' packages.
See links below for details:
https://williamlam.com/2022/11/heads-up-unable-to-open-vib-archive-in-streaming-mode-using-export-es...
https://github.com/VFrontDe-Org/ESXi-Customizer-PS/issues/57
https://bugs.python.org/issue34035
https://github.com/VFrontDe-Org/ESXi-Customizer-PS/issues/56#issuecomment-1406854982