How to Download Large ISO Files Directly to ESXi Datastore via CLI When wget Fails


8 views

Many ESXi administrators face this frustrating scenario: You need to download a 4GB Linux ISO directly to your datastore, but the built-in wget in ESXi's BusyBox implementation doesn't support HTTPS. When you try:

wget https://example.com/ubuntu-22.04.iso -O /vmfs/volumes/datastore1/ISOs/ubuntu.iso

You're greeted with wget: not an http or ftp url - a common limitation in ESXi's stripped-down environment.

Method 1: Using cURL Instead

ESXi 6.7+ includes curl which handles HTTPS properly:

curl -L -o /vmfs/volumes/datastore1/ISOs/ubuntu.iso \\
https://releases.ubuntu.com/22.04/ubuntu-22.04-live-server-amd64.iso

Key flags:

  • -L: Follow redirects (common with download mirrors)
  • -o: Specify output path

Method 2: SCP Transfer from Another Linux Host

If you have SSH access to another Linux machine with proper HTTPS support:

# On remote Linux host:
wget https://example.com/file.iso

# Then transfer to ESXi:
scp file.iso root@esxi-host:/vmfs/volumes/datastore1/ISOs/

Method 3: Temporary HTTP Proxy

For environments where you control the network:

# On your local machine:
python3 -m http.server 8000

# On ESXi:
wget http://your-laptop-ip:8000/file.iso -O /vmfs/volumes/datastore1/file.iso

Always verify checksums after download:

# Get SHA256 checksum (ESXi 6.7+)
sha256sum /vmfs/volumes/datastore1/ISOs/ubuntu.iso

# Compare with published value
echo "a4acfda10b18da50e2ec50ccaf860d7f7b40d0d38b0eaaedb6d1db18e5cd6b8a /vmfs/volumes/datastore1/ISOs/ubuntu.iso" | sha256sum -c

For Windows admins, PowerCLI offers another approach:

Connect-VIServer -Server esxi-host
$ds = Get-Datastore -Name "datastore1"
Copy-DatastoreItem -Item "https://example.com/file.iso" -Destination "[$ds] ISOs/file.iso"

For large files (10GB+), consider these optimizations:

  • Use curl with --limit-rate 10M to avoid saturating the connection
  • If transferring over VPN, compress first: curl --compressed
  • For frequent downloads, set up a local mirror or proxy cache

Many VMware administrators face this frustrating scenario: You SSH into your ESXi host to download a large installation ISO directly to your datastore using wget, only to encounter the wget: not an http or ftp url error. This typically happens because:

  • ESXi's built-in wget lacks SSL/TLS support
  • Modern download sources increasingly use HTTPS exclusively
  • The lightweight BusyBox implementation has limited functionality

Method 1: Using curl (ESXi 6.7+)

Recent ESXi versions include curl with SSL support:

curl -k -o /vmfs/volumes/datastore1/ISOs/ubuntu-22.04.iso https://releases.ubuntu.com/22.04/ubuntu-22.04-live-server-amd64.iso

Key flags:

  • -k: Allow insecure connections (if you trust the source)
  • -o: Specify output path

Method 2: SCP Transfer from Another Linux Host

If you have access to another Linux box with proper wget/curl:

# On your Linux box:
wget -O - https://example.com/large.iso | ssh root@esxi-host "cat > /vmfs/volumes/datastore1/large.iso"

Method 3: PowerCLI Automation

For Windows admins, this PowerShell snippet works well:

$esxHost = "your-esxi-host"
$datastore = "datastore1"
$isoUrl = "https://example.com/os.iso"
$destination = "/vmfs/volumes/$datastore/ISOs/os.iso"

Invoke-WebRequest -Uri $isoUrl -OutFile "C:\temp\temp.iso"
Copy-VMGuestFile -Source "C:\temp\temp.iso" -Destination $destination -VMHost $esxHost -LocalToGuest
Remove-Item "C:\temp\temp.iso"

For multi-gigabyte ISOs, consider these optimizations:

  • Use --no-check-certificate with wget if available
  • Split large files into chunks (if the source supports ranges):
    curl -r 0-999999999 -o part1 https://example.com/large.iso
    curl -r 1000000000-1999999999 -o part2 https://example.com/large.iso
    cat part1 part2 > /vmfs/volumes/datastore1/complete.iso
    
  • Monitor progress with pv if installed:
    curl -k https://example.com/large.iso | pv | dd of=/vmfs/volumes/datastore1/large.iso
    

For frequent downloads, consider these more permanent approaches:

  1. Install the full wget package via ESXi Community Packaging:
    esxcli software vib install -v https://example.com/wget.vib
    
  2. Set up a small Linux VM as a download proxy
  3. Create a NFS share mounted to both your workstation and ESXi host

Remember that any modifications to ESXi may affect your support eligibility, so weigh the risks carefully for production environments.