Reminder to self to check if wget on ESXi now finally supports https downloading: [WayBack] Downloading files with wget on ESXi · random writes.
In the mean time, ESXi 6.7 Update 2 and up seems to support this; so the below workaround might only be needed for ESXi 6.7 update 1 and below.
[WayBack] VMware ESXi: help downloading large ISO – Server Fault
I will likely not do this, as by now all my ESXi boxes should have been recent enough.
I will keep the article because of the BusyBox commands section below.
If so, I might finally try and write a Python wrapper for this, as I know that Python 3 on ESXi supports https, but the ESXi BusyBox does not have a built-in cURL.
Some links and notes I might need by then:
BusyBox commands
Another cool thing in the above blog post is that it shows how to dump the BusyBox built in commands.
I ran it for ESXi 6.7 with a slight trick to get the full path (using back-ticks and escaped back-ticks) and content.
Since ESXi is BusyBox based, the commands that are in /bin
are not actually binaries, but each command is a symlink to the BusyBox binary. BusyBox then knows the original name of the command, so it can deduct what part to execute. This makes for a very space efficient storage scheme.
The various bits of the tricks to get the location of the BusyBox binary, so the --list
parameter can be passed to it:
- The
which wget
gives the full path of wget
.
- The
ls -l `which wget`
shows the full path of wget
and the symlink target (but there is no way for ls to only show the symlink target).
- The
readlink -f `which wget`
shows the full path of where /bin/wget
points to: the BusyBox binary.
The main trick consists of backtick evalution, and knowing that ls
cannot get you just the symlink target, but readlink
can:
Now the back-tick escapes, because you cannot nest back-ticks:
- The
`readlink -f \`which wget\``
executes the BusyBox binary without arguments.
- The
`readlink -f \`which wget\`` --list
executes the BusyBox binary with the --list
parameter.
Note I do not like the cat --help
(see [WayBack] How do I check busybox version (from busybox)? – Unix & Linux Stack Exchange) way of getting the BusyBox version, as that gets echoed to stderr
.
This is the output:
Read the rest of this entry »
Like this:
Like Loading...