10

I'd like to download a large OS install ISO directly to my datastore. I used to be able to SSH to the ESXi terminal and use wget to download large files directly to the datastore, but it seems that wget can't handle https links anymore (wget: not an http or ftp url).

I'm wondering how others handle this. I know I can download the file to my laptop and use the datastore browser to upload it, but that's a two-step process (not to mention horribly inefficient when I'm offsite and accessing ESX through a VPN).

Thanks in advance for any suggestions!

  • 1
    Just wanted to bump this for you, though I'm sure your need from 2.5 years ago has long passed. I'm having the same issue. To add clarity, I'm using wget from the cli of ESXi 6.0 via an SSH connection to the host. I've tried https, and got the same message you are getting. I then setup an FTP server to try that and the connection is timing out, though use of wget from other linux systems on this network are completing the transfer perfectly. – Sunny Molini Jan 7 '16 at 21:08
1

Around ESXi 6.7, the embedded busybox wget finally started to support https.

So finally, you can do https downloads in ESXi.

Yay!

This is from ESXi 6.7 Update 2.

[root@ESXi-X9SRI-3F:/tmp] wget https://www.example.org
Connecting to www.example.org (93.184.216.34:443)
index.html           100% |******************************************************************************************|  1270  0:00:00 ETA
[root@ESXi-X9SRI-3F:/tmp] wget --help
BusyBox v1.29.3 (2018-11-02 15:37:50 PDT) multi-call binary.

Usage: wget [-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]
    [--header 'header: value'] [-Y|--proxy on/off] [-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
    -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)
    -U STR      Use STR for User-Agent header
    -Y on/off   Use proxy
[root@ESXi-X9SRI-3F:/tmp] vmware -l
VMware ESXi 6.7.0 Update 2

Whereas 6.5U2 still did not support it (I think ESXi 6.7 also did not, but I do not have a box to this this on any more):

[root@ESXi-X10SRH-CF:/tmp] wget https://www.example.org
wget: not an http or ftp url: https://www.example.org
[root@ESXi-X10SRH-CF:/tmp] wget --help
BusyBox v1.22.1 (2018-07-23 19:34:04 PDT) multi-call binary.

Usage: wget [-csq] [-O FILE] [-Y on/off] [-P DIR] [-U AGENT] URL...

Retrieve files via HTTP or FTP

    -s  Spider mode - only check file existence
    -c  Continue retrieval of aborted transfer
    -q  Quiet
    -P DIR  Save to DIR (default .)
    -O FILE Save to FILE ('-' for stdout)
    -U STR  Use STR for User-Agent header
    -Y  Use proxy ('on' or 'off')

[root@ESXi-X10SRH-CF:/tmp] vmware -l
VMware ESXi 6.5.0 Update 2
  • 1
    Cool, thanks for the update. I have not use VMware in a few years, but good to know they finally support this... – ebarrere Jul 16 '19 at 18:04
5

Hopefully, you have a running guest system on the existing VMware setup... That's one quick option. If linux, you can wget/curl. If Windows, just download as normal.

I typically download .ISO files to the vCenter server and upload to the datastore from there. That's easy since my vCenter is usually a Windows server, so any complex download authentication methods are easy to deal with.

wget does exist in ESXi, so maybe the best option is to get the .ISO file you need to a location that does not require an https download; http or normal ftp.

Also see: cURL on ESXi 5.0?

  • Thanks for the answer. I don't have vCenter, so unfortunately that's not an option. Can I access the datastore directly from a guest VM? I need to install VMs from the image I download so it needs to be accessible from ESX. – ebarrere Jun 3 '13 at 16:50
  • What OS is this? Can you get the .ISO to another location? wget works just fine on http and ftp URLs. – ewwhite Jun 3 '13 at 16:54
  • you should be able to install the vsphere client within the guest VM I would think. Still your 2 step process but eliminates the offsite/VPN issue. – TheCleaner Jun 3 '13 at 16:57
  • Assuming the client is Windows. – ewwhite Jun 3 '13 at 17:00
  • 6
    How often are you moving ISOs? It's a hypervisor, not a file server – Joel E Salas Jun 3 '13 at 17:07
2

You don't mention the laptop OS. Assuming it is Windows, you can use WinSCP.

Log into your ESXi host, drill into your datastore, and do a filecopy using a Commander style, or optionally a Windows Explorer style interface.

If you are looking for a command line option, you can use Putty Secure Copy client.

I use both - gui for one off file copies, and command line to copy files to several ssh hosts.

2

Just SSH-proxy the file download operation through another system with an SSL-enabled wget. Note that the default ESXi firewall policy blocks outgoing SSH, so it needs to be allowed first. From the ESXi shell :

esxcli network firewall ruleset set -r sshClient -e true
ssh proxyhost curl -s https://server/path/file.iso >/vmfs/volumes/vmfs_name/path/file.iso
esxcli network firewall ruleset set -r sshClient -e false
0

Wget from busybox on ESX doesn't support https URLs.

wget --help
BusyBox v1.20.2 (2012-12-11 11:54:28 PST) multi-call binary.
Retrieve files via HTTP or FTP

So, either try http or use above workarounds.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.