WGET (World Wide Web GET) is a free tool that allows us to download web content from the internet easily through command line. I recently installed vSphere environment as below. My purpose was to install a Windows 10 guest inside the ESXi host but I didn’t have an ISO. While I was thinking wget came to my mind, and I tried to download a Windows 10 ISO from the Microsoft website.
This article will explains how to overcome the following errors while using wget in ESXi.
First and foremost, make sure the ESXi host has access the internet and that proper DNS is configured and working. Even though ports / DNS and internet is allowed on the network ESXi won’t be able to download files from outside httpClient is blocked in the ESXi firewall.
How to know whether the httpClient is open in the ESXI firewall.
esxcli network firewall ruleset list | grep -i httpClient
httpClient false >>>>> false means it is not opened
To open the httpClient, you can use the following command.
esxcli network firewall ruleset set -e true -r httpClient
#To verify
esxcli network firewall ruleset list | grep -i httpClient
httpClient true
Once the above requirements are met, if you are still facing issues while downloading files, this blog might help to find the solution.
Error 1
Connecting to software.download.prss.microsoft.com (23.3.XX.XX:443)
wget: error getting response: Invalid argument
Error 2
Connecting to software.download.prss.microsoft.com (23.3.XX.XX:443)
wget: error getting response: Cannot assign requested address
Error 3
File name too long
First I logged in to ESXi shell via terminal. I have installed the below version of ESXi and wget package is already comes with ESXi.
[root@Mine-1:/vmfs/volumes/6869aXXX-XXX] vmware -vl
VMware ESXi 7.0.3 build-19193900
VMware ESXi 7.0 Update 3
[root@Mine-1:/vmfs/volumes/6869aXXX-XXX] wget
BusyBox v1.29.3 (2021-06-30 11:17:36 PDT) multi-call binary.
Usage: wget [-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]
[-o|--output-file FILE] [--header 'header: value'] [-Y|--proxy on/off]
[--no-check-certificate]
[-P DIR] [-S|--server-response] [-U|--user-agent AGENT] URL...
Retrieve files via HTTP or FTP
--spider Only check URL existence: $? is 0 if exists
--no-check-certificate Don't validate the server's certificate
-c Continue retrieval of aborted transfer
-q Quiet
-P DIR Save to DIR (default .)
-S Show server response
-O FILE Save to FILE ('-' for stdout)
-o FILE Log messages to FILE
-U STR Use STR for User-Agent header
-Y on/off Use proxy
You should have the URL of the package in my case I am gonna download the windows ISO. Here is the official Microsoft website that provides the Windows 10 URL.
Let me show the steps and error messages I encountered and how I fixed them while using wget in ESXi.
[root@MiXX-1:~] wget https://software.download.prss.microsoft.com/dbazure/Win10_22H2_EnglishInternational_x64v1.iso?t=b619a364-ab32-432f-a1c1-fc01a32369ae&P1=1751881491&P2=601&P3=2&P4=0sq%2bd1RUdQm
4GU3SnbdRTnV7jAxmEqiHFjc9vR8pU4jTe1Z41%2fYFWhzGw221HfuUUTnBphtiATDJzGKoxAdi85lH%2bgCKOjVx4y8nII1fGbtlXOy7Fi298gDyc2cPQxgRnf5qQLxDFQKT5WBcuxADoRU6pXPB20mvPjGiFu7ou6%2fLzgaFxQN2WDAkgRq4bJdn5yvKIV3HngyJTDa
vjWQGlhTN%2bLwfLDX0TULnSICv%2bm41SSeqIRXCeg%2fkyw32rAZCABp1Z%2f8Y30lUODP9PrBigAgWPf8NBJLzp51niJxK2jHT8Q5lVn4znJDf7U%2fXA5z9YstR%2fia3S1fhqMHK0qNcrA%3d%3d
[2] Done wget https://software.download.prss.microsoft.com/dbazure/Win10_22H2_EnglishInternational_x64v1.iso?t=b619a364-ab32-432f-a1c1-fc01a32369ae
[root@Mine-1:~] Connecting to software.download.prss.microsoft.com (23.3.75.199:443)
wget: error getting response: Invalid argument
There were no quotes within the URL above, so I added the URL within quotes. See what happen next.
[root@MiXX-1:~] wget 'https://software.download.prss.microsoft.com/dbazure/Win10_22H2_EnglishInternational_x64v1.iso?t=b619a364-ab32-432f-a1c1-fc01a32369ae&P1=1751881491&P2=601&P3=2&P4=0sq%2bd1RUdQ
m4GU3SnbdRTnV7jAxmEqiHFjc9vR8pU4jTe1Z41%2fYFWhzGw221HfuUUTnBphtiATDJzGKoxAdi85lH%2bgCKOjVx4y8nII1fGbtlXOy7Fi298gDyc2cPQxgRnf5qQLxDFQKT5WBcuxADoRU6pXPB20mvPjGiFu7ou6%2fLzgaFxQN2WDAkgRq4bJdn5yvKIV3HngyJTD
avjWQGlhTN%2bLwfLDX0TULnSICv%2bm41SSeqIRXCeg%2fkyw32rAZCABp1Z%2f8Y30lUODP9PrBigAgWPf8NBJLzp51niJxK2jHT8Q5lVn4znJDf7U%2fXA5z9YstR%2fia3S1fhqMHK0qNcrA%3d%3d'
Connecting to software.download.prss.microsoft.com (23.3.75.199:443)
wget: error getting response: Cannot assign requested address
[4]+ Done wget https://software.download.prss.microsoft.com/dbazure/Win10_22H2_EnglishInternational_x64v1.iso?t=b619a364-ab32-432f-a1c1-fc01a32369ae
[3]+ Done wget https://software.download.prss.microsoft.com/dbazure/Win10_22H2_EnglishInternational_x64v1.iso?t=b619a364-ab32-432f-a1c1-fc01a32369ae
[1]+ Done(1) wget https://software.download.prss.microsoft.com/dbazure/Win10_22H2_EnglishInternational_x64v1.iso?t=b619a364-ab32-432f-a1c1-fc01a32369ae
[root@Minecraft-1:~]
To resolve the error above, I simply added below command at the end of the wget.
--no-check-certificate
[root@MiXX-1:~] wget 'https://software.download.prss.microsoft.com/dbazure/Win10_22H2_EnglishInternational_x64v1.iso?t=b619a364-ab32-432f-a1c1-fc01a32369ae&P1=1751881491&P2=601&P3=2&P4=0sq%2bd1RUdQ
m4GU3SnbdRTnV7jAxmEqiHFjc9vR8pU4jTe1Z41%2fYFWhzGw221HfuUUTnBphtiATDJzGKoxAdi85lH%2bgCKOjVx4y8nII1fGbtlXOy7Fi298gDyc2cPQxgRnf5qQLxDFQKT5WBcuxADoRU6pXPB20mvPjGiFu7ou6%2fLzgaFxQN2WDAkgRq4bJdn5yvKIV3HngyJTD
avjWQGlhTN%2bLwfLDX0TULnSICv%2bm41SSeqIRXCeg%2fkyw32rAZCABp1Z%2f8Y30lUODP9PrBigAgWPf8NBJLzp51niJxK2jHT8Q5lVn4znJDf7U%2fXA5z9YstR%2fia3S1fhqMHK0qNcrA%3d%3d' --no-check-certificate
Connecting to software.download.prss.microsoft.com (23.3.75.199:443)
wget: can't open 'Win10_22H2_EnglishInternational_x64v1.iso?t=b619a364-ab32-432f-a1c1-fc01a32369ae&P1=1751881491&P2=601&P3=2&P4=0sq%2bd1RUdQm4GU3SnbdRTnV7jAxmEqiHFjc9vR8pU4jTe1Z41%2fYFWhzGw221HfuUUTnBphtiATDJzGKoxAdi85lH%2bgCKOjVx4y8nII1fGbtlXOy7Fi298gDyc2cPQxgRnf5qQLxDFQKT5WBcuxADoRU6pXPB20mvPjGiFu7ou6%2fLzgaFxQN2WDAkgRq4bJdn5yvKIV3HngyJTDavjWQGlhTN%2bLwfLDX0TULnSICv%2bm41SSeqIRXCeg%2fkyw32rAZCABp1Z%2f8Y30lUODP9PrBigAgWPf8NBJLzp51niJxK2jHT8Q5lVn4znJDf7U%2fXA5z9YstR%2fia3S1fhqMHK0qNcrA%3d%3d': File name too long
File name too long means that we have not specify the name of the file. There is an option in WGET to specify the file name.
-O FILE Save to FILE ('-' for stdout
Lets try add same command with -O option specifying the name.
[root@MiXX-1:~] wget -O windows10.iso 'https://software.download.prss.microsoft.com/dbazure/Win10_22H2_EnglishInternational_x64v1.iso?t=b619a364-ab32-432f-a1c1-fc01a32369ae&P1=1751881491&P2=601&P3=
2&P4=0sq%2bd1RUdQm4GU3SnbdRTnV7jAxmEqiHFjc9vR8pU4jTe1Z41%2fYFWhzGw221HfuUUTnBphtiATDJzGKoxAdi85lH%2bgCKOjVx4y8nII1fGbtlXOy7Fi298gDyc2cPQxgRnf5qQLxDFQKT5WBcuxADoRU6pXPB20mvPjGiFu7ou6%2fLzgaFxQN2WDAkgRq4b
Jdn5yvKIV3HngyJTDavjWQGlhTN%2bLwfLDX0TULnSICv%2bm41SSeqIRXCeg%2fkyw32rAZCABp1Z%2f8Y30lUODP9PrBigAgWPf8NBJLzp51niJxK2jHT8Q5lVn4znJDf7U%2fXA5z9YstR%2fia3S1fhqMHK0qNcrA%3d%3d' --no-check-certificate
Connecting to software.download.prss.microsoft.com (23.3.75.198:443)
saving to 'windows10.iso'
windows10.iso 0% | | 16.0M 0:06:04 ETAwget: write error: No space left on device
Finally ended up with space issue as expected. I was running the wget command from root directory where doesn’t have enough space. I switched to local datasore where has enough space to keep the windows ISO.
[root@MiXX-1:/vmfs/volumes/6869a20b-2adde7ab-df29-40a6b776fa60] wget -O windows10.iso 'https://software.download.prss.microsoft.com/dbazure/Win10_22H2_EnglishInternational_x64v1.iso?t=b619a364-ab
32-432f-a1c1-fc01a32369ae&P1=1751881491&P2=601&P3=2&P4=0sq%2bd1RUdQm4GU3SnbdRTnV7jAxmEqiHFjc9vR8pU4jTe1Z41%2fYFWhzGw221HfuUUTnBphtiATDJzGKoxAdi85lH%2bgCKOjVx4y8nII1fGbtlXOy7Fi298gDyc2cPQxgRnf5qQLxDFQKT5
WBcuxADoRU6pXPB20mvPjGiFu7ou6%2fLzgaFxQN2WDAkgRq4bJdn5yvKIV3HngyJTDavjWQGlhTN%2bLwfLDX0TULnSICv%2bm41SSeqIRXCeg%2fkyw32rAZCABp1Z%2f8Y30lUODP9PrBigAgWPf8NBJLzp51niJxK2jHT8Q5lVn4znJDf7U%2fXA5z9YstR%2fia3S
1fhqMHK0qNcrA%3d%3d' --no-check-certificate
Connecting to software.download.prss.microsoft.com (151.101.14.172:443)
saving to 'windows10-1.iso'
windows10-1.iso 9% |***************
I hope this helped you. Thanks for reading. 🙏




