Monthly Archives: October 2008

My name is Rick Westrate.Aaron Sweemer has been gracious enough to invite me to contribute some I (hopefully) insightful content to his snazzy new site.Now what in the world would qualify me to comment on the world of virtualization you ask?Let’s set the record straight.I certainly do not claim to be the authority on the subject.However, I do believe my11 years of experience in the enterprise IT industry and my position with my employer, VMware, provides me with an occasional unique perspective on the virtualization industry.Before joining VMware, I worked as a consultant focused on a wide array of datacenter technologies ranging from VMware virtualization, large Citrix PS implementations, (woops, it’s called XenApp these days), and storage arrays implementations (primarily EMC).These days, I work as a Systems Engineer in West Michigan, focused on large Enterprise Accounts.I travel around spending time with customers, listening to their problems, concerns, and needs.I then work with them on walking through and understanding the many game-changing solutions VMware provides.It’s certainly an exciting time to be in the virtualization industry.The pace of innovation, and change is amazing.SO, hello to you all!Hang on tight and stay tuned.I will be publishing some additional content soon.I look forward to interacting with everyone and hearing what you have to say!

I’ve been using Perl for close to 10 years now, so my natural tendency has been to use Perl when creating automation scripts for virtual infrastructure. Now for some reason, there has been a significant increase in the amount of questions I get about scripting repetitive virtual infrastructure tasks. In fact, just yesterday a customer asked me “is there an easy way to rescan the HBA’s in all off my (many) hosts?” With the GUI, this could translate into 100s of clicks and a very boring hour or more of work. Of course, a properly written script could easily handle this, requiring a mere 30 seconds of his time. And again, a few months ago I would have answered the question by pointing him towards Perl.

But recently there has been a lot of buzz around Powershell and the VI Toolkit for Windows. So I started checking it out a few months ago and thus far, I’m very impressed. Check this out, a script that would solve the HBA rescan problem I just described could be as simple as this …

Pretty easy, huh? Here is a quick little script I wrote for a customer that’s standing up a large number of ESX servers and they didn’t want to manually add all of them to VirtualCenter. The DNS names of their ESX servers were computernamexxx.domain.com.

## Gather the number of ESX hosts, the root password and the first ESX to be added
$nh = Read-Host “How many hosts are we connecting?”
$rp = Read-Host “What is the root password of the hosts?”
[int]$start = Read-Host “What is the number of the first host (computernamexxx.domain.com)?”
$stop = $start + $nh

Or, here’s a quick and dirty one liner I used to remove the VLAN ID’s on a port group. If you want to add or change the VLAN ID, rather than remove it, simply change the 0 at the end of the line to the actual VLAN ID.

As you can probably tell, I’ve decided that I like Powershell and the VI Toolkit for Windows. It’s VERY handy. In fact, I’m thinking of collecting my favority scripts, tools and links and compiling a separte page. So look for that coming soon. For now, here are some essentials: