The greatest challenge to any thinker is stating the problem in a way that will allow a solution

Bertrand Russell

Welcome to vBlog, a personal record of my techy tinkerings and particular ponderings.

I tend to focus on VMware virtualisation, and the interaction/automation of it using PowerCLI (VMware's PowerShell Snapin), but anything that I happen to stumble across that seems like it might be of use at a later date, may well get recorded here.

I also maintain vWiki, which was a predecessor to this blog. Wiki's are great for quickly recording snippets of info, but tend not to look that great; Blog's are better looking things, but seem to require more effort so that the posts/articles are accessible in their own right. As a result I tend to update both interchangeably as available time, and depth of thought, permit.

If you happen to find anything of use, or in need of correction please leave a comment. Knowing that my ramblings are of some use is a great reward; and similarly I'd hate to waste anybody's time by feeding them duff info.

See these pages for me info about me, and my vBlog, and below for my recent posts...

3 Apr 2012



With SSH access to your ESX servers, it is relatively easy to get the driver and firmware software revision versions that are running (see further reading section at bottom of post).  Which is fine for a one-off inspection, but if you want review your entire ESX estate, this can be quite tedious.

With the wonder of PowerCLI, it is possible to gain most of this information from your vCentre, which will have sourced the information from your ESX through its hardware CIM provider.  But the quality of data returned in this manner varies, you can get…

  • No data (if you server vendor hasn’t fully implemented CIM to cover the server and peripheral devices, or you haven’t installed the CIM provider software, even if you can get data for X and Y, Z may be missing, for example HBA firmware on all HP servers I’ve had the pleasure of looking after)
  • Duplicate data (if you’ve upgraded software you can sometimes get both old and new versions reported)
  • Inconsistent data (representations vary between manufacturers/vendors, so dealing with different makes or even models from the same manufacturer is problematic)

I do all reporting through PowerShell and PowerCLI scripts, and had got fed up with having to tinker with my scripts to try and never fully trusting the data I was seeing.  But more recently I’ve been using PowerShell to act as an SSH client, so decided to take a different approach…
Continue reading →

Being able to create scripts to complete repetitive tasks and complete work that would otherwise give you headache is a wonderful thing, being able to schedule those scripts increases the available fire-power in your arsenal.

Like most things in IT, it can be a bit of a head scratcher to sort out the first time, but once you’ve seen it once you can just copy and paste. See below for a few examples…. Continue reading →

12 Mar 2012


(No comments)

Whilst not always recommended for production use, its certainly very common for admins to want to have SSH access enabled to all ESX’s all of the time. You don’t need it for day to day support tasks, but it can be very useful, especially when things start to go wrong.  And to my mind, the easier it is to start getting into the detail of an incident, all the better chances you have of resolving it quickly and correctly.

However, enabling SSH access causes a yellow warning on your ESX’s with is annoying, and risks clouding other more important errors you might want to take action on.

If you’re running ESX5 you may see…

  • ESXi Shell for the Host has been enabled
  • SSH for the host has been enabled

There are three ways that I’m aware of to remove the warning… Continue reading →

Recently I had to migrate a collection of virtual machines from one vCentre to another.  They didn’t have to change datastore, so there was no need to whip VMware Converter out and cause a mass movement of data.  Just a case of unregistering from one vCentre and registering with another.  However, there were over 20 machines, in various datastores hosting some VM’s with duplicate VM names, meaning it would be quite a laborious process, and manual error prone.

So, in order to make the process nice and reliable and avoid any machines getting lost on the way, I wrote a quick script to do the hard work… Continue reading →

vApps can be wonderful things.  Essentially resource pools on steroids, I never really used resource pools that much (unless I was revising for a VCP exam), but I find the ability to control a bunch of VM’s as one entity, controlling their start-up and shut-down order very useful.  However, controlling that start-up and shut-down functionality is a pain.  The default options are (for me) wrong, and its a laborious task to go through them all and update.

As soon as I feel the potential for RSI in my mouse arm, is when I feel the need for a bit of PowerCLI script-o-magic… Continue reading →

Came across an odd problem today, whereby nobody could use any of the deploy template options as they were all greyed out…

  • Clone…
  • Convert to Virtual Machine…
  • Deploy Virtual Machine from this Template…

We’re all admins with full rights over everything, so it wasn’t a permissioning issue (although I suspect it might be a permissioning bug).  The fix is to just re-add the Templates into the vCenter inventory (fuller details below if you don’t know how this is done). Continue reading →

The ability to snapshot a VM is wondrous thing; the ability for a snapshot to be forgotten, eat up all all your storage or grow so large that you can’t remove it without causing impact is not so wondrous.

How you manage snapshots is up to, but unless you routinely tidy them up (especially if you use some thing that utilises snapshots like vRanger, which can occasionally leave them behind), they will cause you a problem at some point.  And sod’s law dictates that the problem occurs to important VM, when you haven’t the time to spare. Continue reading →

A while back I came across an intermittent storage problem, whereby paths were occasionally going down and coming back up for a period of time.  In order to be able to tally the timings of the events up with other goings on (eg when looking at SAN logs etc) I needed to create a an export of when the events were occurring.

Note that Get-VIEvent is limited to 1000 results, which will typically get 1 – 2 days worth depending on your infrastructure. To get a longer history would require multiple calls to Get-VIEvent using the -Start and -Finish parameters Continue reading →

Its bizarrely difficult to be able to map VMware presented datastore names to the underlying LUN’s in the PowerCLI, despite the fact that its readily available via the VI Client.  It’s even more difficult if you have to worry about both VI3 and VI4 vSphere installations as they handle storage in differing ways, hence the two different approaches below. The ESX3 method attacks the problem by starting its search at an ESX, whereas for ESX4 we start the attack at the cluster…

Continue reading →

VMware’s support of PowerShell is laudable, personally I’ve tried (and failed) to become au-fait with Perl too many times to recall, so being able to script for your virtual infrastructure in PowerShell has been a god send for me.  If you know nothing of PowerShell, don’t let that put you off, nor did I before I started PowerCLI scripting.  There are a wealth of support pages out there to help, and here is my attempt to get you on your way…

Continue reading →