[GH-ISSUE #15] "[WinError 10054] An existing connection was forcibly closed by the remote host" during "Exporting the Imageprofile" #4

Closed
opened 2026-02-28 02:14:11 +03:00 by kerem · 21 comments
Owner

Originally created by @reedy on GitHub (Apr 29, 2020).
Original GitHub issue: https://github.com/VFrontDe-Org/ESXi-Customizer-PS/issues/15

I've seen the other tasks, but they seem to be failing on the steps during downloading the images/isos, but I'm getting a failure during the "Exporting the Imageprofile" step... And I can't see why it'd be failing on a web connection related issue when writing a file locally.

It did fail downloading the ISO originally, so I downloaded it manually and stuffed it in the directory, which made it get further

I also disabled the windows firewall...

ESXi-Customizer-PS-17776.log

I guess this might be more an underlying bug with Export-EsxImageprofile... But I thought I'd try here first :)

I was following https://andrewroderos.com/vmware-esxi-home-lab-intel-nuc-frost-canyon/ which said to run Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass but that failed

Originally created by @reedy on GitHub (Apr 29, 2020). Original GitHub issue: https://github.com/VFrontDe-Org/ESXi-Customizer-PS/issues/15 I've seen the other tasks, but they seem to be failing on the steps during downloading the images/isos, but I'm getting a failure during the "Exporting the Imageprofile" step... And I can't see why it'd be failing on a web connection related issue when writing a file locally. It did fail downloading the ISO originally, so I downloaded it manually and stuffed it in the directory, which made it get further I also disabled the windows firewall... [ESXi-Customizer-PS-17776.log](https://github.com/VFrontDe/ESXi-Customizer-PS/files/4552459/ESXi-Customizer-PS-17776.log) I guess this might be more an underlying bug with `Export-EsxImageprofile`... But I thought I'd try here first :) I was following https://andrewroderos.com/vmware-esxi-home-lab-intel-nuc-frost-canyon/ which said to run `Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass` but that failed
kerem 2026-02-28 02:14:11 +03:00
Author
Owner

@cybero2912 commented on GitHub (May 5, 2020):

same here :(

<!-- gh-comment-id:624004485 --> @cybero2912 commented on GitHub (May 5, 2020): same here :(
Author
Owner

@pantigon commented on GitHub (May 11, 2020):

me too...:D

<!-- gh-comment-id:626502779 --> @pantigon commented on GitHub (May 11, 2020): me too...:D
Author
Owner

@hansnull commented on GitHub (May 11, 2020):

same here, issued command was:
.\ESXi-Customizer-PS.ps1 -v67 -vft -load sata-xahci,net55-r8168,net51-r8169

<!-- gh-comment-id:626994473 --> @hansnull commented on GitHub (May 11, 2020): same here, issued command was: .\ESXi-Customizer-PS.ps1 -v67 -vft -load sata-xahci,net55-r8168,net51-r8169
Author
Owner

@spinmyego commented on GitHub (May 12, 2020):

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\v2.0.50727]
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft.NETFramework\v2.0.50727]
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001

  1. regedit -> import
  2. windows restart
  3. powershell - .\ESXi-Customizer-PS.ps1 -pkgDir .\
  4. All done.
<!-- gh-comment-id:627180094 --> @spinmyego commented on GitHub (May 12, 2020): REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727] "SchUseStrongCrypto"=dword:00000001 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727] "SchUseStrongCrypto"=dword:00000001 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319] "SchUseStrongCrypto"=dword:00000001 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319] "SchUseStrongCrypto"=dword:00000001 1. regedit -> import 2. windows restart 3. powershell - .\ESXi-Customizer-PS.ps1 -pkgDir .\ 4. All done.
Author
Owner

@reedy commented on GitHub (May 13, 2020):

I'm not sure how changing .NET crypto (and why in multiple different versions/variants) helps solve a problem when it's supposed to be writing things to disk, not reading stuff from the internet..

<!-- gh-comment-id:628027814 --> @reedy commented on GitHub (May 13, 2020): I'm not sure how changing .NET crypto (and why in multiple different versions/variants) helps solve a problem when it's supposed to be writing things to disk, not reading stuff from the internet..
Author
Owner

@pantigon commented on GitHub (May 14, 2020):

error when used: ".\ESXi-Customizer-PS.ps1-v70 -vft -load sata-xahci,net55-r8168"

<!-- gh-comment-id:628462398 --> @pantigon commented on GitHub (May 14, 2020): error when used: ".\ESXi-Customizer-PS.ps1-v70 -vft -load sata-xahci,net55-r8168"
Author
Owner

@Chavell3 commented on GitHub (May 17, 2020):

Hey there,

I'm having the same issue like the others before...
When exporting the image I get the error message.

Exporting the Imageprofile to 'C:\Users\Administrator\Downloads\ESXi-7.0.0-15843807-standard.iso'. Please be patient ...

An unexpected error occurred:
[WinError 10054] An existing connection was forcibly closed by the remote host

I also tried the reg-keys above, but this doesn't help...

Is there any help for that?

<!-- gh-comment-id:629841857 --> @Chavell3 commented on GitHub (May 17, 2020): Hey there, I'm having the same issue like the others before... When exporting the image I get the error message. ``` Exporting the Imageprofile to 'C:\Users\Administrator\Downloads\ESXi-7.0.0-15843807-standard.iso'. Please be patient ... An unexpected error occurred: [WinError 10054] An existing connection was forcibly closed by the remote host ``` I also tried the reg-keys above, but this doesn't help... Is there any help for that?
Author
Owner

@mr-craps commented on GitHub (May 18, 2020):

Hey there!
Try to create an offline bundle in front of the install iso by using the the parameter -ozip.
After creation, you can use that file to create the installation iso with -izip.

# -ozip
# output an Offline bundle instead of an installation ISO
.\ESXi-Customizer-PS.ps1 -ozip

# -izip <bundle>
# use the VMware Offline bundle <bundle> as input instead of the Online depot
.\ESXi-Customizer-PS.ps1 -izip .\<bundle>.zip

Replace <bundle> with the name of the created offline bundle (e.g. ESXi-7.0.0-15843807-standard)

That worked for me :)

<!-- gh-comment-id:629882499 --> @mr-craps commented on GitHub (May 18, 2020): **Hey there!** Try to create an offline bundle in front of the install iso by using the the parameter `-ozip`. After creation, you can use that file to create the installation iso with `-izip`. ``` # -ozip # output an Offline bundle instead of an installation ISO .\ESXi-Customizer-PS.ps1 -ozip # -izip <bundle> # use the VMware Offline bundle <bundle> as input instead of the Online depot .\ESXi-Customizer-PS.ps1 -izip .\<bundle>.zip ``` Replace **_\<bundle>_** with the name of the created offline bundle (e.g. ESXi-7.0.0-15843807-standard) That worked for me :)
Author
Owner

@mwilson6491 commented on GitHub (Jun 16, 2020):

To include offline bundles to inject NIC drivers, the -pkgDir option can be added to the -ozip line. This assumes the offline bundle packages are in the same directory as the script.

.\ESXi-Customizer-PS.ps1 -ozip -pkgDir ./

<!-- gh-comment-id:644835047 --> @mwilson6491 commented on GitHub (Jun 16, 2020): To include offline bundles to inject NIC drivers, the -pkgDir option can be added to the -ozip line. This assumes the offline bundle packages are in the same directory as the script. .\ESXi-Customizer-PS.ps1 -ozip -pkgDir ./
Author
Owner

@Nevexo commented on GitHub (Jul 3, 2020):

Combining the two comments above, if you're wanting to load the net drivers, this works:

.\ESXi-Customizer-PS.ps1 -v70 -ozip -pkgDir ./ -load net-r8168,net-r8169
.\ESXi-Customizer-PS.ps1 -izip .\[...]-standard-customized.zip
<!-- gh-comment-id:653616979 --> @Nevexo commented on GitHub (Jul 3, 2020): Combining the two comments above, if you're wanting to load the net drivers, this works: ``` .\ESXi-Customizer-PS.ps1 -v70 -ozip -pkgDir ./ -load net-r8168,net-r8169 .\ESXi-Customizer-PS.ps1 -izip .\[...]-standard-customized.zip ```
Author
Owner

@cddisk2000 commented on GitHub (Jul 10, 2020):

@reedy @cybero2912 @pantigon
use this PowerCLI version ==> Install-Module -Name VMware.PowerCLI -RequiredVersion 10.2.0.9372002
i meet same error [WinError 10054] ......... I don't understand how to solve this problem
ESXi-6.7.0-20200604001-standard-customized-202007110209.log

<!-- gh-comment-id:656808591 --> @cddisk2000 commented on GitHub (Jul 10, 2020): @reedy @cybero2912 @pantigon use this PowerCLI version ==> Install-Module -Name VMware.PowerCLI -RequiredVersion 10.2.0.9372002 i meet same error [WinError 10054] ......... I don't understand how to solve this problem [ESXi-6.7.0-20200604001-standard-customized-202007110209.log](https://github.com/VFrontDe/ESXi-Customizer-PS/files/4904699/ESXi-6.7.0-20200604001-standard-customized-202007110209.log)
Author
Owner

@virtualex-itv commented on GitHub (Jul 10, 2020):

I've seen the other tasks, but they seem to be failing on the steps during downloading the images/isos, but I'm getting a failure during the "Exporting the Imageprofile" step... And I can't see why it'd be failing on a web connection related issue when writing a file locally.

It did fail downloading the ISO originally, so I downloaded it manually and stuffed it in the directory, which made it get further

I also disabled the windows firewall...

ESXi-Customizer-PS-17776.log

I guess this might be more an underlying bug with Export-EsxImageprofile... But I thought I'd try here first :)

I was following andrewroderos.com/vmware-esxi-home-lab-intel-nuc-frost-canyon which said to run Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass but that failed

If a WinError 10054 is encountered, run the following commands then reboot your machine and retry:
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Ssl3

<!-- gh-comment-id:656938625 --> @virtualex-itv commented on GitHub (Jul 10, 2020): > I've seen the other tasks, but they seem to be failing on the steps during downloading the images/isos, but I'm getting a failure during the "Exporting the Imageprofile" step... And I can't see why it'd be failing on a web connection related issue when writing a file locally. > > It did fail downloading the ISO originally, so I downloaded it manually and stuffed it in the directory, which made it get further > > I also disabled the windows firewall... > > [ESXi-Customizer-PS-17776.log](https://github.com/VFrontDe/ESXi-Customizer-PS/files/4552459/ESXi-Customizer-PS-17776.log) > > I guess this might be more an underlying bug with `Export-EsxImageprofile`... But I thought I'd try here first :) > > I was following [andrewroderos.com/vmware-esxi-home-lab-intel-nuc-frost-canyon](https://andrewroderos.com/vmware-esxi-home-lab-intel-nuc-frost-canyon/) which said to run `Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass` but that failed If a WinError 10054 is encountered, run the following commands then reboot your machine and retry: `[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Ssl3`
Author
Owner

@reedy commented on GitHub (Jul 11, 2020):

I don't see how that will help; It's supposed to be writing something to disk, not making network connections to wherever

<!-- gh-comment-id:656952493 --> @reedy commented on GitHub (Jul 11, 2020): I don't see how that will help; It's supposed to be writing something to disk, not making network connections to wherever
Author
Owner

@virtualex-itv commented on GitHub (Jul 11, 2020):

It works as I’ve used this fix numerous times but it’s up to you if you want to use it or not

<!-- gh-comment-id:656957197 --> @virtualex-itv commented on GitHub (Jul 11, 2020): It works as I’ve used this fix numerous times but it’s up to you if you want to use it or not
Author
Owner

@reedy commented on GitHub (Jul 11, 2020):

Obviously. But there's not much point making changes arbitarily without understanding if/how they actually help

Do you just run every command someone on the internet tells you to to fix an issue?

Like, why do I need to enable SSL3? Considering it's a pretty broken format... https://disablessl3.com/

<!-- gh-comment-id:657044940 --> @reedy commented on GitHub (Jul 11, 2020): Obviously. But there's not much point making changes arbitarily without understanding if/how they actually help Do you just run every command someone on the internet tells you to to fix an issue? Like, why do I need to enable SSL3? Considering it's a pretty broken format... https://disablessl3.com/
Author
Owner

@reedy commented on GitHub (Jul 11, 2020):

Does the vmware tool communicate with itself or different parts using a local HTTP server using HTTPS?

Even then, it hardly explains why I need apparently both SSL3 and TLS1.2?

<!-- gh-comment-id:657046404 --> @reedy commented on GitHub (Jul 11, 2020): Does the vmware tool communicate with itself or different parts using a local HTTP server using HTTPS? Even then, it hardly explains why I need apparently both SSL3 and TLS1.2?
Author
Owner

@virtualex-itv commented on GitHub (Jul 11, 2020):

I understand what you mean and unfortunately I don’t have the answers for you. I just wanted to simply provide a solution that I’ve tried which I know worked for me and could potentially help others.

<!-- gh-comment-id:657054402 --> @virtualex-itv commented on GitHub (Jul 11, 2020): I understand what you mean and unfortunately I don’t have the answers for you. I just wanted to simply provide a solution that I’ve tried which I know worked for me and could potentially help others.
Author
Owner

@virtualex-itv commented on GitHub (Jul 13, 2020):

OK, running a fresh installation of Windows 10 (2004) x64 and latest PowerCLI from PSGallery...

I was not presented with this issue and am unable to reproduce. Export competed successfully, so this is not an issue with the script...

PS C:\Windows\system32> ..\..\Users\virtualex\Desktop\ESXi-Customizer-PS\ESXi-Customizer-PS.ps1 -v70 -sip -outDir ..\..\Users\virtualex\Desktop\

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

Temporarily logging to C:\Users\virtualex\AppData\Local\Temp\ESXi-Customizer-PS-14376.log ...

Running with PowerShell version 5.1 and VMware PowerCLI version 12.0.0 build 15947286

Connecting the VMware ESXi Software depot ... [OK]

Getting Imageprofiles, please wait ... [OK]

Select Base Imageprofile:
-------------------------------------------
1 : ESXi-7.0bs-16321839-standard
2 : ESXi-7.0bs-16321839-no-tools
3 : ESXi-7.0b-16324942-standard
4 : ESXi-7.0b-16324942-no-tools
5 : ESXi-7.0.0-15843807-standard
6 : ESXi-7.0.0-15843807-no-tools
-------------------------------------------
Enter selection: 3

Using Imageprofile ESXi-7.0b-16324942-standard ...
(Dated 06/02/2020 17:26:43, AcceptanceLevel: PartnerSupported,
The general availability release of VMware ESXi Server 7.0b brings whole new levels of virtualization performance to datacenters and enterprises.)

Exporting the Imageprofile to '..\..\Users\virtualex\Desktop\\ESXi-7.0b-16324942-standard.iso'. Please be patient ...


All done.

(Log file moved to ..\..\Users\virtualex\Desktop\\ESXi-7.0b-16324942-standard.iso-202007131526.log)

PS C:\Windows\system32>
<!-- gh-comment-id:657748876 --> @virtualex-itv commented on GitHub (Jul 13, 2020): OK, running a fresh installation of Windows 10 (2004) x64 and latest PowerCLI from PSGallery... I was not presented with this issue and am unable to reproduce. Export competed successfully, so this is not an issue with the script... ``` PS C:\Windows\system32> ..\..\Users\virtualex\Desktop\ESXi-Customizer-PS\ESXi-Customizer-PS.ps1 -v70 -sip -outDir ..\..\Users\virtualex\Desktop\ This is ESXi-Customizer-PS Version 2.8.0 (visit https://ESXi-Customizer-PS.v-front.de for more information!) (Call with -help for instructions) Temporarily logging to C:\Users\virtualex\AppData\Local\Temp\ESXi-Customizer-PS-14376.log ... Running with PowerShell version 5.1 and VMware PowerCLI version 12.0.0 build 15947286 Connecting the VMware ESXi Software depot ... [OK] Getting Imageprofiles, please wait ... [OK] Select Base Imageprofile: ------------------------------------------- 1 : ESXi-7.0bs-16321839-standard 2 : ESXi-7.0bs-16321839-no-tools 3 : ESXi-7.0b-16324942-standard 4 : ESXi-7.0b-16324942-no-tools 5 : ESXi-7.0.0-15843807-standard 6 : ESXi-7.0.0-15843807-no-tools ------------------------------------------- Enter selection: 3 Using Imageprofile ESXi-7.0b-16324942-standard ... (Dated 06/02/2020 17:26:43, AcceptanceLevel: PartnerSupported, The general availability release of VMware ESXi Server 7.0b brings whole new levels of virtualization performance to datacenters and enterprises.) Exporting the Imageprofile to '..\..\Users\virtualex\Desktop\\ESXi-7.0b-16324942-standard.iso'. Please be patient ... All done. (Log file moved to ..\..\Users\virtualex\Desktop\\ESXi-7.0b-16324942-standard.iso-202007131526.log) PS C:\Windows\system32> ```
Author
Owner

@virtualex-itv commented on GitHub (Jul 17, 2020):

apparently - that was short lived. After doing some more research, it seems that the website from where the images are pulled from requires SSL3 to connect and pull properly. (I agree that it shouldn't require this but I have no control over that)

After running [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Ssl3 to add SSL3 support in PowerShell and rebooting the computer, the script executes as expected every time. I will see if I can bring this up internally.

<!-- gh-comment-id:659755387 --> @virtualex-itv commented on GitHub (Jul 17, 2020): apparently - that was short lived. After doing some more research, it seems that the website from where the images are pulled from requires SSL3 to connect and pull properly. (I agree that it shouldn't require this but I have no control over that) After running `[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Ssl3` to add SSL3 support in PowerShell and rebooting the computer, the script executes as expected every time. I will see if I can bring this up internally.
Author
Owner

@virtualex-itv commented on GitHub (Jan 5, 2021):

FYI - a possible solution is being tested. Thanks for your patience. :)

<!-- gh-comment-id:754410546 --> @virtualex-itv commented on GitHub (Jan 5, 2021): FYI - a possible solution is being tested. Thanks for your patience. :)
Author
Owner

@virtualex-itv commented on GitHub (Oct 18, 2022):

workaround added into v 2.8.2 and later

<!-- gh-comment-id:1282593857 --> @virtualex-itv commented on GitHub (Oct 18, 2022): workaround added into v 2.8.2 and later
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ESXi-Customizer-PS#4
No description provided.