Lately I’ve been watching David Davis’s Train Signal video on vSphere while exercising at the gym, which has been beneficial on multiple levels. One of the points he makes in the vSphere Management Options video is that the vSphere graphical user interface (GUI) client is used 99% of the time for managing the environment. I couldn’t agree more — I have multiple shortcuts to different versions of the client on my desktop — it truly is a great tool. Yet, we still have that 1% of tasks that the GUI just cannot accommodate, for which we must use command-line tools at the Service Console.
In my experience with desktop support many people become so used to GUIs that they don’t want to consider any command line work, even for basic things like running ipconfig at the MS DOS prompt. Others feel that only purists use command line tools, bringing to mind a Hollywood image of some genius hacker hunched over a keyboard, surrounded by empty pizza boxes, writing code in a bunch of terminal windows in his own compiled operating system. Alas, that is not always the case (sometimes it’s take out Chinese boxes).
Here is an experience I had a couple weeks ago that illustrates the value of knowing and using the VMware command line tools in the Service Console.
Environment: ESX 3.0 hosting multiple VMs.
One individual was patching the operating system on a virtual machine (VM), and then rebooted it. The VM didn’t come back online. I then tried to help the person by using the GUI to force the VM to power off.
The status of the power-off command hung at 95%.
One green tea latte and an hour later the operation is still at 95%.
At this point, I had to consider my options. I could either use the GUI to power-down the other VMs and reboot ESX. No good, as they are production VMs, and cannot have downtime. Or, I could use a command-line tool to try to reset the misbehaving VM.
For a command-line tool interface, I use PuTTY (free), customized with a glaring obnoxious orange background and black text. I find it easy to read and the colors helps me keep my concentration since it is so difficult to ignore.
To resolve this situation, I used
ps -ef|grep <servername>
to get the PID (process identifier) number. Then,
kill -9 <PID>
Next, back to the GUI to start up the VM, which worked without a hitch.
Resolution time, including looking up the command line tools to make sure I spelled them properly: less than 10 minutes.
There is no reason to be intimidated by command-line tools in the Service Console. They are not much different than DOS, or even older versions of NetWare. That said, it can take some time to become comfortable with command-line tools. One way that worked for me was finding an old computer, installing Linux, and using the terminal window to try different things such as browsing directories, finding files, and so on. There are also some terrific Service Console command line resources available on the Web, such as Mike Laverick’s RTFM Education.
Using command line does not make you a purist in the same way that using GUIs doesn’t make you a newbie. Both have their place, and the ability to use all the tools in our toolbox makes our lives that much easier!