There was a question today on the VMTN community forum about traceroute and ESXi. The user was troubleshooting a networking issue and logging into Tech Support Mode (Busybox Console) of ESXi, had noticed this common networking utility was not available. Since the user was working in a production environment, a re-compilation of a custom Busybox applet was out of the question and most likely unsupported by VMware. The user had to explore other avenues of troubleshooting, or did they have to?
It may not be well known, but within the Busybox Console, a Python interpreter is installed and accessible with a limited set of modules. Armed with this fact, you can actually create your own "poor man's traceroute" which gave you functionality similar to that of the actual traceroute/tracert implementation. This "poor man's" version was dubbed by a blog article I had found online (sorry, no ghetto in this name) by Leonid Grinberg - Learning by doing: Writing your own traceroute in 8 easy steps. The author goes into extreme detail providing step by step instructions on his python implementation of traceroute. Leonid provides a fully functional script at the end of his blog post, but he does caveat the following statement at the end:
This is actually not quite how the real
traceroute
works. Rather than checking the IP addresses of the hosts and stopping when the destination address matches, it stops when it receives a ICMP “port unreachable” message, which means that the host has been reached. For our purposes, though, this simple address heuristic is good enough.
This was definitely another alternative if one needed functionality similar to that of traceroute. I used the author's polished version of traceroute.py and scp'ed the script onto an ESXi host. It ran just as well as the real traceroute on the classic ESX Service Console.
Though this may not have solved the original network issue, it is important to know what utilities you have at your disposal, even if it is not the actual tool that you are familiar with. There is always more than one way to do something and it is always good to know a few.
VMware does limit the number of "common" UNIX/Linux utilities that are bundled within the Busybox applet and based on demand and feature requests, we may see future utilities added to Tech Support Mode. One example is the release of vSphere 4.1, we saw the addition of nc (netcat) and tcpdump which are invaluable troubleshooting utilities for a vSphere admin. If there are other utilities that you feel should be included in the default Busybox applet, be sure to submit your feedback to either your VMware rep or file a feature request.