ESXi のインストール時、 iso イメージへ予め NIC のドライバーを入れておくときなどに使う ESXi-Customizer-PS ですが、処理の途中で WinError 10054 が発生して失敗する場合があります。
その際、以下の方法で実行するとうまくいったのでメモ。

環境

  • ESXi-Customizer-PS Version 2.8.1
  • VMware PowerCLI 12.1.0 build 17009493
  • Windows 10 Version 1909 Build 18363.1198

エラーの内容

PS C:\tmp>  .\ESXi-Customizer-PS.ps1 -v70 -pkgDir .\vib

This is ESXi-Customizer-PS Version 2.8.1 (visit https://ESXi-Customizer-PS.v-front.de for more information!)
(Call with -help for instructions)
:
:
An unexpected error occurred:
[WinError 10054] ?????????????????????????????? ????????????????????????????????????????????????

If requesting support please be sure to include the log file
C:\Users\buu\AppData\Local\Temp\ESXi-Customizer-PS-28676.log

対応策

以下のように -ozip オプションを使用して offline bundle を作成した後、-izip オプションを使用して offline bundle から iso イメージを作成します。
ESXi 7.0 と 6.7 で試したところ、いずれのバージョンでも WinError 10054 は発生せず、iso イメージを正常に作成することができました。

PS C:\tmp>  .\ESXi-Customizer-PS.ps1 -ozip -v70 -pkgDir .\vib

This is ESXi-Customizer-PS Version 2.8.1 (visit https://ESXi-Customizer-PS.v-front.de for more information!)
(Call with -help for instructions)

Logging to C:\Users\buu\AppData\Local\Temp\ESXi-Customizer-PS-28676.log …

Running with PowerShell version 5.1 and VMware PowerCLI version .. build

Connecting the VMware ESXi Software depot … [OK]

Getting Imageprofiles, please wait … [OK]

Using Imageprofile ESXi-7.0U1b-17168206-standard …
(Dated 11/11/2020 11:34:51, AcceptanceLevel: PartnerSupported,

The general availability release of VMware ESXi Server 7.0U1b brings whole new levels of virtualization performance to datacenters and enterprises.)

Loading Offline bundles and VIB files from . …
Loading C:\tmp\vib\VMW_bootbank_vmkusb-nic-fling_2.1-6vmw.701.0.0.40599856.vib … [OK]
Add VIB vmkusb-nic-fling 2.1-6vmw.701.0.0.40599856 [OK, added]

Exporting the Imageprofile to 'C:\tmp\ESXi-7.0U1b-17168206-standard-customized.zip'. Please be patient …

All done.
PS C:\tmp>  .\ESXi-Customizer-PS.ps1 -izip .\ESXi-7.0U1b-17168206-standard-customized.zip -v70

This is ESXi-Customizer-PS Version 2.8.1 (visit https://ESXi-Customizer-PS.v-front.de for more information!)
(Call with -help for instructions)

Logging to C:\Users\buu\AppData\Local\Temp\ESXi-Customizer-PS-28676.log …

Running with PowerShell version 5.1 and VMware PowerCLI version .. build

Adding base Offline bundle .\ESXi-7.0U1b-17168206-standard-customized.zip … [OK]

Getting Imageprofiles, please wait … [OK]

Using Imageprofile ESXi-7.0U1b-17168206-standard-customized …
(Dated 11/11/2020 11:34:51, AcceptanceLevel: PartnerSupported,

The general availability release of VMware ESXi Server 7.0U1b brings whole new levels of virtualization performance to datacenters and enterprises. (customized))

Exporting the Imageprofile to 'C:tmp\ESXi-7.0U1b-17168206-standard-customized.iso'. Please be patient …

All done.

Enjoy!