WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / Heads Up - Unable to open VIB archive in streaming mode using Export-EsxImageProfile with PowerCLI 13.0

Heads Up - Unable to open VIB archive in streaming mode using Export-EsxImageProfile with PowerCLI 13.0

11.30.2022 by William Lam // 10 Comments

An issue that I ran into after upgrading to the latest PowerCLI 13.0 release after it GA'ed was attempting to export an ESXi image profile that I had created to an ISO file using the Export-EsxImageProfile cmdlet and immediately hit the following error:

Export-EsxImageProfile: Error retrieving file for VIB 'VMware_bootbank_esx-update_8.0.0-1.0.20513097': ('vib20/esx-update/VMware_bootbank_esx-update_8.0.0-1.0.20513097.vib', "Unable to open VIB archive in streaming mode: '_SharedFile' object has no attribute 'writing'").

I am an avid use of this cmdlet and have never ran into this issue before and I was not sure if this could be related to the porting of the Image Builder and Auto Deploy cmdlets to PowerShell Core, which was new with the PowerCLI 13.0 release. I have already filed an internal bug and the PowerCLI Engineering team have not had a chance to look at it, but over the past week, I have noticed a number of reports on my blog, VMTN community forums, Reddit and Twitter that other users were also hitting this issue.

As I have already responded in a few of these channels already, a bug has been filed and there is currently not a work around that I am aware of. As I have any updates, I will update this article with more details.

UPDATE - Several readers have informed me that if you update to Python 3.7.9 or greater, the issue should go away.

The options right now is to either use the vSphere Image Builder UI OR vSphere Lifecycle Manager (vLCM) UI or the new vLCM PowerCLI cmdlets, both of which requiring a vCenter Server running vSphere 8.0.

More from my site

  • PowerCLI 13.0 on Photon OS
  • Quick Tip - Changes to building custom ESXi images in vSphere 8
  • Automated enablement of vSphere with Tanzu using vSphere Zones in vSphere 8
  • How to create a customized ESXi ISO without vCenter Server?
  • Deploying NSX-T VIBs and/or creating custom NSX-T Image Profile

Categories // Automation, ESXi, PowerCLI, vSphere 8.0 Tags // image builder, PowerCLI, vSphere 8.0

Comments

  1. *protectedparambil says

    11/30/2022 at 6:28 pm

    Hope to have fix soon for this

    Reply
  2. *protecteducorsu says

    12/06/2022 at 9:20 am

    Thank you for your post, ithought i was alone with that !
    Look forward for good news soon i hope... no Vsphere 8 here....
    My homelab cant wait 🙂

    Reply
  3. *protectedstephen says

    12/08/2022 at 5:39 pm

    Spent around 3 hours before I found out this was a stupid bug... thank you. I hope this fixed. Cant figure out how to get intel i226 drivers on any esxi without having vserver.

    Reply
  4. *protectedVaughn says

    12/13/2022 at 8:06 pm

    In the same spot trying to build the iso for my nuc. Hope to see a fix soon, thanks for what you do William!

    Reply
    • *protectedVaughn says

      12/15/2022 at 9:11 pm

      I rolled back powercli to 12.7 and was able to make it work that way.

      Reply
  5. *protected111111 says

    12/15/2022 at 12:10 am

    Seems like a Python issue: https://bugs.python.org/issue34035
    I got the same error, resolved by installing Python 3.7.9

    Reply
    • *protectedmrtech2020 says

      12/18/2022 at 6:26 pm

      Thanks for this suggestion. I was looking for a tip in what's causing this error. 👍

      Reply
    • *protected222222 says

      12/20/2022 at 5:23 pm

      This fixed the issue for me too. Successfully created a custom 8.0 image. Thank you!

      Reply
  6. *protectedMarty The Party says

    12/28/2022 at 5:03 am

    I finally got ESXi 8.0 running with a Startech USB31000S (after many hours scouring blog comments!).

    This allowed me to generate an ISO for ESXi 8.0 with Fling drivers. I hope this helps others:

    Prereqs:
    1. Python 3.7.9 (not 3.7) - refer https://williamlam.com/2022/11/heads-up-unable-to-open-vib-archive-in-streaming-mode-using-export-esximageprofile-with-powercli-13-0.html
    2. PowerCLI 13.0

    Helpful links:
    https://gist.github.com/gspivey/69b5c12962e00bf85c9cfdc954ad13f6
    https://www.virten.net/2020/04/how-to-add-the-usb-nic-fling-to-esxi-7-0-base-image/

    PowerShell Dump:
    Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.

    Try the new cross-platform PowerShell https://aka.ms/pscore6

    PS C:\WINDOWS\system32> cd 'D:\ESXi Images\ESXi Fling ISO\'
    PS D:\ESXi Images\ESXi Fling ISO> Add-EsxSoftwareDepot .\ESXi-8.0.0-20513097-standard.zip
    WARNING: Please consider joining the VMware Customer Experience Improvement Program, so you can help us make PowerCLI a
    better product. You can join using the following command:

    Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $true

    VMware's Customer Experience Improvement Program ("CEIP") provides VMware with information that enables VMware to
    improve its products and services, to fix problems, and to advise you on how best to deploy and use our products. As
    part of the CEIP, VMware collects technical information about your organization’s use of VMware products and services
    on a regular basis in association with your organization’s VMware license key(s). This information does not
    personally identify any individual.

    For more details: type "help about_ceip" to see the related help article.

    To disable this warning and set your preference use the following command and restart PowerShell:
    Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $true or $false.

    Depot Url
    ---------
    zip:D:\ESXi Images\ESXi Fling ISO\ESXi-8.0.0-20513097-standard.zip?index.xml

    PS D:\ESXi Images\ESXi Fling ISO> Add-EsxSoftwareDepot .\ESXi800-VMKUSB-NIC-FLING-61054763-component-20826251.zip

    Depot Url
    ---------
    zip:D:\ESXi Images\ESXi Fling ISO\ESXi800-VMKUSB-NIC-FLING-61054763-component-20826251.zip?index.xml

    PS D:\ESXi Images\ESXi Fling ISO> New-EsxImageProfile -CloneProfile "ESXi-8.0.0-20513097-standard" -name "ESXi-8.0.0-20513097-standard-USBNIC" -Vendor "VMW"

    Name Vendor Last Modified Acceptance Level
    ---- ------ ------------- ----------------
    ESXi-8.0.0-20513097-standar... VMW 23/09/2022 6... PartnerSupported

    PS D:\ESXi Images\ESXi Fling ISO> Add-EsxSoftwarePackage -ImageProfile "ESXi-8.0.0-20513097-standard-USBNIC" -softwarePackage "vmkusb-nic-fling"

    Name Vendor Last Modified Acceptance Level
    ---- ------ ------------- ----------------
    ESXi-8.0.0-20513097-standar... VMW 28/12/2022 8... PartnerSupported

    PS D:\ESXi Images\ESXi Fling ISO> Export-ESXImageProfile -ImageProfile "ESXi-8.0.0-20513097-standard-USBNIC" -ExportToIso -filepath ESXi-8.0.0-20513097-standard-USBNIC.iso -force -NoSignatureCheck
    PS D:\ESXi Images\ESXi Fling ISO>

    Reply
  7. *protectedAaron says

    01/05/2023 at 5:38 pm

    Thanks to everyone for sharing helpful comments and the Python PR. To resolve this, I was able to replace the file lib/zipfile.py from my python install folder with the same file from a newer python 3.7.9+ build and restart my PowerCLI session. Hope that brings about a quick fix for some one else.

    Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • VMware Flings is now available in Free Downloads of Broadcom Support Portal (BSP) 05/19/2025
  • VMUG Connect 2025 - Minimal VMware Cloud Foundation (VCF) 5.x in a Box  05/15/2025
  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025