Virtualization Pro

Oct 12 2009   3:11PM GMT

Using the command line doesn’t make you a purist

Makking Mak King Profile: Makking

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).

Most of us “Average Joes” use a combination of both.  It is important to know how to use command line tools (even if you have to double-check the syntax most of the time).

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%.

Uh oh.

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!

Cheers!

Mak King

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: