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

PS 2.8.1 "The read operation timed out" #36

Closed wangwill closed 3 years ago

wangwill commented 3 years ago

.\ESXi-Customizer-PS.ps1 -v67 -vft -load net55-r8168,net-igb,sata-xahci

Same issue with .\ESXi-Customizer-PS.ps1 -v67 -vft -load net55-r8168,net-igb,sata-xahci

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

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

Connecting the V-Front Online depot ... [OK]

Getting Imageprofiles, please wait ... [OK]

Using Imageprofile ESXi-6.7.0-20201104001-standard ... (Dated 11/11/2020 12:40:19, AcceptanceLevel: PartnerSupported, Updates ESXi 6.7 Image Profile-ESXi-6.7.0-20201104001-standard)

Load additional VIBs from Online depots ... Add VIB net55-r8168 8.045a-napi [New AcceptanceLevel: CommunitySupported] [OK, added] Add VIB net-igb 5.3.2-99 [OK, replaced 5.0.5.1.1-5vmw.670.0.0.8169922] Add VIB sata-xahci 1.42-1 [OK, added]

Exporting the Imageprofile to 'C:\Users\Will\Desktop\Esxi 6.7\ESXi-6.7.0-20201104001-standard-customized.iso'. Please be patient ...

PS>TerminatingError(Export-EsxImageProfile): "The read operation timed out"

TerminatingError(Export-EsxImageProfile): "The read operation timed out"

An unexpected error occurred: The read operation timed out

virtualex-itv commented 3 years ago

Unfortunately, you cannot use those drivers with v67 as they are technically only supported on v55 and possibly v60. @VFrontDe would be able to confirm best. Also, what version of PowerShell are you running this on?

wangwill commented 3 years ago

Unfortunately, you cannot use those drivers with v67 as they are technically only supported on v55 and possibly v60. @VFrontDe would be able to confirm best. Also, what version of PowerShell are you running this on?

I am using PowerShell Version 5.1.19041.610

virtualex-itv commented 3 years ago

Unfortunately, you cannot use those drivers with v67 as they are technically only supported on v55 and possibly v60. @VFrontDe would be able to confirm best. Also, what version of PowerShell are you running this on?

I am using PowerShell Version 5.1.19041.610

@wangwill - OK, what version of PowerCLI are you using as well? Taking another look at the command you ran above, sata-xahci cannot be used with 6.7 as it's only supported on 5.0 through 6.0.

JoVuon commented 3 years ago

Hi,

I got the same error as OP, but I'm just trying to download/build from the latest online patch. PowerShell 5.1 and VMware-vSphere-CLI-6.7.0-8156551.

Any idea why it cannot write to my local drive? I've set PS script to execution to "Unrestricted".

Error from the log:


Windows PowerShell transcript start Start time: 20210126230251 Username: xxxx* RunAs User: xxxx* Configuration Name: Machine: MAYA (Microsoft Windows NT 10.0.19042.0) Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe Process ID: 15188 PSVersion: 5.1.19041.610 PSEdition: Desktop PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.610 BuildVersion: 10.0.19041.610 CLRVersion: 4.0.30319.42000 WSManStackVersion: 3.0 PSRemotingProtocolVersion: 2.3 SerializationVersion: 1.1.0.1


Running with PowerShell version 5.1 and VMware PowerCLI version 12.1.0.16997984

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

Getting Imageprofiles, please wait ... [OK]

Using Imageprofile ESXi-6.7.0-20201104001-standard ... (dated 11/11/2020 12:40:19, AcceptanceLevel: PartnerSupported, Updates ESXi 6.7 Image Profile-ESXi-6.7.0-20201104001-standard)

Exporting the Imageprofile to 'E:\tmp\VMware\ESXi-6.7.0-20201104001-standard.iso'. Please be patient ...

PS>TerminatingError(Export-EsxImageProfile): "The read operation timed out" >> TerminatingError(Export-EsxImageProfile): "The read operation timed out"

An unexpected error occured: The read operation timed out

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


Windows PowerShell transcript end End time: 20210126231015


storkinsj commented 3 years ago

I experienced the same error but finally got out of it.

When I specified the -load packages, I included one in your instruction video called esx-tools-for-esxi . When it tried to download, said didn't exist. However, looks like the script tries to read it later and failed because it never downloaded, then failed the whole script.

If that's the behavior (attempt to read something that didn't download), I think it saves time to fail immediately after attempting to grab the package in the load command.

The response above to this thread on read timeouts: "Unfortunately, you cannot use those drivers with v67"... lead me down this path because it does not seem like the appropriate answer for a read problem. It does when you realize the script is trying to read a driver file that isn't going to be there.

storkinsj commented 3 years ago

Actually- I thought I fixed it. It looks like it is still happening intermittently with the same CLI. Perhaps it's network related. My successful run involved "no version" so it just pulled the latest 70 version.

Strange because the error happens when it is writing the ISO at the end. It doesn't seem like it would be doing network access at that time.

storkinsj commented 3 years ago

A little more debugging, this IS a network read error. I got it to succeed by using a different ISP. I have been having problems with my ISP, but I did not get any download errors from this script.

I noticed that there was massive network access during the "writing output" stage (see screenshot), so there is a live reading from the network when writing out the ISO file. This is unexpected.

If the "read error" changed to a "network read error", or maybe if you're able to download what you need first, I think there could be less confusion. No one is expecting a network read after messages saying the image was downloaded.

esxCustomizer png

virtualex-itv commented 3 years ago

all of the reported errors stem from an issue with the VMware site that houses the images requiring SSL3 connection. No idea why it requires this when TLS12 should work, but even with that said, it's hit or miss at times even after enabling support for SSL3 on a per session basis. Unfortunately, it's not a script issue with ESXi-Customizer.ps1