VFrontDe-Org / ESXi-Customizer-PS

PowerCLI script that greatly simplifies and automates the process of creating fully patched and customized VMware ESXi installation images
668 stars 165 forks source link

Unable to open VIB archive in streaming mode #54

Closed mrpressIdent closed 1 year ago

mrpressIdent commented 1 year ago

Hi,

I have installed PowerCLI 13 and wanted to create the ESXi8 ISO. When adding a VIB for ESXi8 it first says it is "ok". And then at the end it gives the error message: ('vib20/qlnativefc/MVL_bootbank_qlnativefc_5.4.80.0-1OEM.800.1.0.20143090.vib', "Unable to open VIB archive in streaming mode: '_SharedFile' object has no attribute 'writing'")

Any Ideas?

fvlaicu commented 1 year ago

Same here:

An unexpected error occurred:
Error retrieving file for VIB 'VMW_bootbank_vmkusb-nic-fling_1.11-1vmw.800.1.20.61054763': ('vib20/vmkusb-nic-fling/VMW_bootbank_vmkusb-nic-fling_1.11-1vmw.800.1.20.61054763.vib', "Unable to open VIB archive in streaming mode: '_SharedFile' object has no attribute 'writing'").
Full log ``` ********************** Windows PowerShell transcript start Start time: 20221125134551 Username: DESKTOP-148I57N\user RunAs User: DESKTOP-148I57N\user Configuration Name: Machine: DESKTOP-148I57N (Microsoft Windows NT 10.0.19045.0) Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Process ID: 8544 PSVersion: 5.1.19041.1682 PSEdition: Desktop PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.1682 BuildVersion: 10.0.19041.1682 CLRVersion: 4.0.30319.42000 WSManStackVersion: 3.0 PSRemotingProtocolVersion: 2.3 SerializationVersion: 1.1.0.1 ********************** Welcome to VMware PowerCLI! Log in to a vCenter Server or ESX host: Connect-VIServer To find out what commands are available, type: Get-VICommand To show searchable help for all PowerCLI commands: Get-PowerCLIHelp Once you've connected, display all virtual machines: Get-VM If you need more help, visit the PowerCLI community: Get-PowerCLICommunity Copyright (C) VMware, Inc. All rights reserved. Running with PowerShell version 5.1 and VMware PowerCLI version 13.0.0 build 20829139 Connecting the VMware ESXi Software depot ... [OK] Getting Imageprofiles, please wait ... WARNING: The cmdlet "Get-PowerCLIVersion" is deprecated. Please use the 'Get-Module' cmdlet instead. [OK] Using Imageprofile ESXi-8.0.0-20513097-standard ... (Dated 09/23/2022 18:59:28, AcceptanceLevel: PartnerSupported, The general availability release of VMware ESXi Server 8.0.0 brings whole new levels of virtualization performance to datacenters and enterprises.) Loading Offline bundles and VIB files from C:\Users\user\Desktop\esxi-customizer\esxi80-drivers\ ... Loading C:\Users\user\Desktop\esxi-customizer\esxi80-drivers\ESXi800-VMKUSB-NIC-FLING-61054763-component-20826251.zip ... [OK] Add VIB vmkusb-nic-fling 1.11-1vmw.800.1.20.61054763 [OK, added] Exporting the Imageprofile to 'C:\Users\user\Desktop\esxi-customizer\ESXi-8.0.0-20513097-standard-customized.iso'. Please be patient ... PS>TerminatingError(Export-EsxImageProfile): "Error retrieving file for VIB 'VMW_bootbank_vmkusb-nic-fling_1.11-1vmw.800.1.20.61054763': ('vib20/vmkusb-nic-fling/VMW_bootbank_vmkusb-nic-fling_1.11-1vmw.800.1.20.61054763.vib', "Unable to open VIB archive in streaming mode: '_SharedFile' object has no attribute 'writing'")." >> TerminatingError(Export-EsxImageProfile): "Error retrieving file for VIB 'VMW_bootbank_vmkusb-nic-fling_1.11-1vmw.800.1.20.61054763': ('vib20/vmkusb-nic-fling/VMW_bootbank_vmkusb-nic-fling_1.11-1vmw.800.1.20.61054763.vib', "Unable to open VIB archive in streaming mode: '_SharedFile' object has no attribute 'writing'")." An unexpected error occurred: Error retrieving file for VIB 'VMW_bootbank_vmkusb-nic-fling_1.11-1vmw.800.1.20.61054763': ('vib20/vmkusb-nic-fling/VMW_bootbank_vmkusb-nic-fling_1.11-1vmw.800.1.20.61054763.vib', "Unable to open VIB archive in streaming mode: '_SharedFile' object has no attribute 'writing'"). If requesting support please be sure to include the log file C:\Users\user\AppData\Local\Temp\ESXi-Customizer-PS-8544.log ********************** Windows PowerShell transcript end End time: 20221125135041 ********************** ```
kerakcz commented 1 year ago

Try downgrading the VMware.PowerCLI because that helped me. Use offline packages (I used this guide and 12.3.0 version).

I tried Install-Module -Name VMware.PowerCLI -RequiredVersion 12.3.0.17860403 but that did not help because the latest version is used for all dependencies and they need to be downgraded too.

fvlaicu commented 1 year ago

Try downgrading the VMware.PowerCLI because that helped me. Use offline packages (I used this guide and 12.3.0 version).

I tried Install-Module -Name VMware.PowerCLI -RequiredVersion 12.3.0.17860403 but that did not help because the latest version is used for all dependencies and they need to be downgraded too.

trying to build an iso for esxi 8.0 - so i need version 13.

fvlaicu commented 1 year ago

Seems this is an upstream problem, not script issue: https://williamlam.com/2022/11/heads-up-unable-to-open-vib-archive-in-streaming-mode-using-export-esximageprofile-with-powercli-13-0.html

virtualex-itv commented 1 year ago

@mrpressIdent - This is a known bug and has been filed internally with the product management team. Currently, there is no workaround so please be patient as we need VMware to fix this...it's not an issue with the script itself.

See here for more info...

fvlaicu commented 1 year ago

There's a solution, upgrade to python 3.7.9 see: https://williamlam.com/2022/11/heads-up-unable-to-open-vib-archive-in-streaming-mode-using-export-esximageprofile-with-powercli-13-0.html#comment-67215

mrpressIdent commented 1 year ago

@fvlaicu Thanks for the link. I didn't check the comment section. I can confirm, that python 3.7.9 fixed the issue on my side.