So recently I was working with a client who was attempting to convert an Oracle Linux OVA to run on ESXi, and asked for some suggestions. Of course, my first thought was don’t, but that’s a topic for a different post. Instead I suggested given the lack of time they had why not just get the .iso of the DVD and install the virtual machine that way. The issue they stated was the image size, that they had tried that but pushing it up to their vCenter was just taking far too long on the slow link that they had.
Since they had the capability to NAT out to the Internet in their environment, I suggested that we just temporarily setup a SNAT to allow an ESXi host out on port 443 to pull down the image directly. They didn’t know that ESXi could do that, and that wget was available, so as a little reminder to everyone I did want to jot that down.
It’s really super easy. And only take a few steps:
- First, SSH into your ESXi host.
- Then, navigate to the datastore you want to place the .iso file. So cd /vmfs/volumes/<your datastore name or ID>/
- Optionally, create a folder to store the .iso in.
- Once you are in the location you want to place the .iso, run
esxcli network firewall ruleset set -e true -r httpClient. This allows the ESXi firewall to allow the traffic through. - Then get your .iso file by using wget. In my case I was getting an Oracle Linux .iso so the command was
wget --no-check-certificate https://yum.oracle.com/ISOS/OracleLinux/OL9/u1/x86_64/OracleLinux-R9-U1-x86_64-dvd.iso. Note the--no-check-certificateflag, which is needed else the command will be unsuccessful. - Once your iso is downloaded, make sure to re-enable the firewall:
esxcli network firewall ruleset set -e false -r httpClient.
That’s all there is to it. Hope this helps if you get caught in this same bind.



Leave a comment