VMware Edu & Cert Community
Mr_Flibble1
Enthusiast
Enthusiast

Advanced "scripting" course for VI3 and Console OS

Back when I took my course for my VCP, the instructor spoke of an "advanced" VMware course dedicated to command line scripting and using the console os in detail. I have a very large Unix background, and I am interested in the things he spoke about, yet when I search VMware education and "Teh Google" I find no mention of such a course.

I have been lurking in the VMTN forums for longer than my ID may show, but I have not seen any mention of such a program. Does a course structured specifically to managing ESX through the console OS exist?

0 Kudos
6 Replies
admin
Immortal
Immortal

Well no not yet. Keep looking though expecally as the VMware VI Toolkit has been released in beta. Keep your eye out for some stuff later this year.

admin
Immortal
Immortal

Hi, Mr. Flibble. I would like to add to my co-worker John ("cpqarray")'s comments above. Also, even if I bore you with too much detail, I have a question for you at the bottom of this message.

There are several ways to script in a VMware Infrastructure environment. The oldest way is with Service Commands. Our VMware Infrastructure 3: Deploy, Secure and Analyze training course covers, among other things, how to do many important VI tasks at the Service Console command line.

A newer way is to use our Web Services API with a programming language such as Perl or Java. For some time now, VMware has made the VI Perl Toolkit available; this package makes programming using the Web Services API a lot easier by wrapping up API calls in nice pre-packaged Perl object methods. Although we don't have any training on the VI Perl Toolkit right now, the documentation contains tons of working examples.

An even newer way to script (new as of 3.5 and 3i) is to use the Remote CLI. This is, in effect, a reimplementation of familiar Service Console commands using the Web Services API. We don't have any standalone training on the Remote CLI either, but you can get a flavor of it from the demonstration of Storage VMotion, a CLI-only feature, in our self-paced online course on what's new in 3.5.

Finally: what John referred to in his post above is the VI Powershell Toolkit. Do you know about Powershell? It is the new Windows CLI, and easily the coolest idea to come out of Microsoft in a long time. (I am a longtime Unix geek, so I hope that compliment has some weight coming from me.) Right now VMware is running a public beta of the VI Powershell Toolkit, which is built on top of Powershell. It is excellent because it lets you do a lot of VI actions from the command line that would take a ton of code in the Perl Toolkit and would be impossible from the Service Console command line. We will be offering self-paced online training on the VI Powershell Toolkit in a few months, and Powershell will be coming to our instructor-led curriculum later.

OK, Mr. Flibble, now I have an opinion question for you (and any other VMware user reading this who cares to weigh in). In my experience, people who want to script VI, or learn more about command-line ESX and VirtualCenter management, do so for one of three reasons:

1

They just prefer the command line over GUIs.

2

They're building automation.

3

Their objective is to troubleshoot, so they want to be able to reach beneath the GUI.

Do you fall into one of these three categories? If so, which? If not, what have I missed?

Thanks!

--

Brian Rice

Education Services Product Manager

Professional Services Organization, VMware, Inc.

Message was edited by: brianriceca to clarify that Powershell comes from Microsoft and the VI Powershell Toolkit comes from VMware

Mr_Flibble1
Enthusiast
Enthusiast

Thanks for the excellent responses. The "mystery course" certanly had me stumped. I suppose I will have a go at Powershell if another Unix user can recommend it. I still don't want to give up bash! :smileysilly:

And, to answer your question brian:

1 They just prefer the command line over GUIs.

I certanly fall into this category. In general I am much faster in a Unix environment with the shell than with a GUI. Having said that, I will use whichever tool is best for the job. For example, in Linux for Active Directory integration I now prefer to use the X tool provided by Red Hat than manually editing conf files as the X tool is faster for my needs.

2 They're building automation.

This is a thing I always like to have up my sleeve. If I get a request that is outside the bounds of normal behaviour, I like the option to script and automate the process so I can do less work! (I am lazy like that.)

3 Their objective is to troubleshoot, so they want to be able to reach beneath the GUI.

I fall into this one as well. Partially for troubleshooting, but also for pure understanding. That is, if I can learn each part of the system from a process/command line level, then I will always know what is happening at the higher levels when using the GUI or the VI Client. I don't like being of the mindframe where I only know how to do something via rote, and which buttons to click on which window. I really want to understand what a given system is doing, and why. If I can know that to a reasonable degree I am more comfortable and more effective in using a system.

0 Kudos
admin
Immortal
Immortal

I suppose I will have a go at Powershell if another Unix user can recommend it. I still don't want to give up bash!

Here is the brilliant thing about Powershell. You know how, in Unix shells since the dawn of time, the key concept has been the text pipeline. So you type ls -ls | sort -nr | head -10 and the like. Powershell is built around pipelines too, but they're object pipelines rather than text pipelines. So all the semantics of each object ride all the way down the pipeline.

So, in the VI Powershell Toolkit, doing a VMotion from the command line starts with something like get-vm | move-vm. That's grossly oversimplified; you have to say which VM you want and where to move it to, and you do that with command-line switches. But you get the idea.

Thanks for answering my little poll about command-line use. Can you think of any other reasons (beyond my 3) to need the command line?

0 Kudos
Mr_Flibble1
Enthusiast
Enthusiast

I can't really think of other reasons to use the shell. Other than simplicity/speed. Sometimes it is considerably faster to complete a one time complex operation in the shell than through multiple GUI clicks. This varies with the task however.

Stop making powershell sound so attractive, I can't give up my protective blanket of Unix being able to solve every IT problem ever created! Smiley Wink

0 Kudos
snemetz
Contributor
Contributor

Also, look at the courses and lab materials from VMworld. Most of the sessions from 2007 are now available free and there are a number of them on scripting.

0 Kudos