VMware ESXi 5.x service console no longer offers ftpget command. But all is not lost.. 🙂 Follow the steps below to transfer your favorite OS installer ISO to the datastore from where you can conveniently mount it as if it were DVD/CD-ROM:
- Download 64-bit ncftp binary distribution to your local (Windows) workstation.
- Open vSphere, highlight the hostname, select the the desired storage unit from the Storage list under Resources (I usually use the datastore on the “system” disk for this purpose), and right click on it to open the context menu, then choose “Browse Datastore”.
- With the root highlighted, click on the “Upload files to this datastore” (the fourth icon from the left, with green “up” arrow). Select the ncftp binary package (that you download in step 1) from your local Windows hard drive.
- After making sure SSH login is enabled on the Yellow and Grey screen (Troubleshooting Options > Enable SSH), log in to the service console via SSH.
- Move the ncftp binary archive to /opt from the Datastore root, decompress it, and cd to the ncftp folder:
mv /vmfs/volumes/yourdatastore/ncftp* .
tar zxvf ncftp*
- Open ESXi firewall egress (outbound) rules so that the FTP client can access the outside FTP server:
esxcli network firewall ruleset set -r ftpClient -e true
- With your favorite installer ISO available on an FTP server (perhaps on the distribution server, or on your local FTP server), you can now access it, like so:
./ncftpget -v -E -u ftpuser -p password some.remotehost.com /vmfs/volumes/mydatastore ‘/remotefilename.iso’
Command from left to right:
ncftp command (requires path, here “./” since you’re in the ncftp directory)
-v for progress indicator
-E for NOT passive mode (omitting it makes connection passive)
-u ftpuser for remote ftp server
-p password for remote ftp server (note: this is NOT sent encrypted!)
some.remotehost.com is the ftp host name or IP address
/vmfs/volumes/mydatastore is the path where you want to store the data on the local system
/remotefilename.iso is the remote file (with full remote path if needed) to be transferred; the local file name will be the same
- Optinally, if you want to close the firewall egress rule for the FTP client, you can do so by issuing the following command:
esxcli network firewall ruleset set -r ftpClient -e false
Now, when starting OS installation in ESXi you can highlight a created blank server instance, click on the CD-ROM icon on the toolbar (“CD/DVD drive 1” > “Connect to ISO image on a datastore…”), and then navigate to and select the ISO image you just transferred to your favorite datastore!