PowerCLI & Windows jump list for recent items set to zero

Today I had to install PowerCLI on my workstation. When I tried launching it for the first time, it simply opened and closed again instantly. After browsing the VMware community for this error and not finding a useful solution, I ended up googling the error. As it turns out, this only happens when you did set the “Number of recent items to display in jump lists” to something less than 4.

After changing the limit to something greater than 4, it just works. This appears to be a Powershell bug.

Changing the vCenter hostname

I recently reinstalled the vCenter Server at work, and in my never ending wisdom *cough*, I decided to do that on new hardware. That entitled using the same host name plus the appendix _NEW. Now, I know this isn’t conforming with DNS naming schemes (iirc underscore isn’t a valid DNS char), however it worked …

So once I had everything installed on the new hardware, I switched the ESX servers from the old vCenter to the freshly installed one. Once that was finished, I shut down the old vCenter server, changed IP address and host name of the new one and rebooted. That basically worked, even though suddenly every ESX in my inventory was disconnected. After reconnecting all ESX servers everything was back online.

Then I tried sorting the list of All VMs in my vCenter and got the error message “Unable to look up vcenter_NEW.home.barfoo.org” when doing so .. I was like *WTF*, searched the registry found a few ones, and after a quick reboot tried again … No luck, still the same error. After looking through the VMware Knowledgebase, I actually found one that worked for me, even if it didn’t apply to my environment 100 percent (we don’t use Linked Mode) …

After fixing the vmw-vc-URL in each property, the sorting actually works!

WDS and DL580 G7

We recently received a shipment of Hewlett Packards all-new DL580 G7. While I’m impressed with what they did with the iLO3, I’m quite disappointed with what they did to the PXE-ROM.

Sure, gPXE may be the future and is offering more possibilites than “normal” PXE, however breaking customers deployment option(s) — at least for Windows that is — really wouldn’t be an option.

Now for the long story, we needed to install a temporary Windows on this DL580 (one with testing purposes). That said, we tried for three days to actually make this work (trying different things with the boot image), but it kept ending with the same result.

WDSClient: there was a problem initializing wds mode
WDSClient: there was a problem initializing wds mode

As you can see from the screenshot, the error message isn’t exactly clear as day. However, after pressing SHIFT + F10, working my way into X:WINDOWSPanther, digging around in the logs I saw a message that the WDS environment wasn’t getting information from the boot controller (like IP address and subnet mask, which is apparently passed on from the controller). So I opened a case with Hewlett-Packard, and guess what they said …

Exactly right, please open up a case with Microsoft, since this is a problem with WDS .. then again, I don’t have the luxury of opening a case with Microsoft since we don’t exactly have Microsoft support … 😛 So in the end, we installed them DL580’s with the addon NC362t network adapters, since that works.

SVC: Find WWPN

Today we had (once again) hardware troubles. We ended up replacing a lot of things, but in the end it was a) the HBA and b) apparently some memory DIMMs. Now, that isn’t SVC related. However, we built in another HBA (from our Standby hardware), which apparently already had been assigned to a host.

Now, since you can’t search for a WWPN (at least not that I know of), I ended up writing a little script (yup, AGAIN) in order to do that for me!

TSM Client: Service Script for Solaris 10

Today I’ve been fighting with Solaris 10 and the SMF Manifest (others would call it init-script …). Since I wanted to do it the proper way (I could have used a “old-style” init-script, but I didn’t wanna ..), I ended up combing the interweb for examples .. As it turns out, not even IBM has documented a way, on how to do this.

In the end this is what I’ve come up with:

However, in order to get the scheduler client working on Solaris, I had to create a little helper script in /opt/tivoli/tsm/client/ba/bin named dsmc.helper:

With that, I was able to automate the TSM Scheduler Client startup on Solaris.

Install issues with Proliant BL460c G6 and Windows Deployment Services

We’ve been dealing with authentification issues on newly delivered HP Proliant BL460c G6 blade servers. Most threads on HPs customer forum, suggests changing the NIC driver, embedded within the WDS boot image.

We tried that, but still were getting the following error:

As it turns out, it ain’t really so damn hard .. we tried several times changing various things within the boot image, but it still didn’t change anything. Somehow it was rather easy.

A quick look at the date/time on the blade turned up a surprising fact:

The current time/date is way off. No clue why, and apparently there’s no NTP client (in any variant – no VBS, no command line) to fix this.

So a  simple date, followed by time fixed the issue. Afterwards the boot image is able to logon with the passed credentials.

However, this change isn’t just limited to the ProLiant BL460c G6, it’s applicable to any system being installed through a WDS that authenticates against Active Directory and is brand new (as in the system time is still waaay off!).

Create an offline snapshot of a VM

We’re currently thinking about automating Windows Updates and the involved disaster snapshot-copy to a degree, where we don’t need to intervene anymore.

Right now, we already have a rudimentary scheduler in place, which does the reboots for some (200 ..) systems already. Now, we’d like to extend it to also cover the bi-weekly Windows Update spree.

Since PowerShell (and PowerCLI) work quite well with vSphere automation, I cooked up the below script to first shutdown a virtual machine (for snapshot consistency reasons), then take a snapshot and power on the virtual machine again afterwards.

Locking down Firefox

Once again, I had the task of locking down Firefox, so users couldn’t use it to do any harm on a terminal server. Thankfully there’s the guide over at the Faculty of Engineering of the University of Waterloo (by David Collie), who shows which parts to modify.

However, finding the particular part in the Javascript is rather hindersome, so here a short Unix-Diff (for thos who’re able to read unified diffs) as well as the whole file.

And here is the whole file: browser.js

This method however has three disadvantages:

  1. Display of local HTML files is disabled
  2. You need to replace the chrome/browser.jar each time, you update your Firefox
  3. It doesn’t work with Firefox 4!

Modified SnapReminder

Well, PowerCLI makes my life a little bit easier. Believe it or not, each of us vCenter infrastructure admins has one of these: a Windows admin, thinking a snapshot is also a backup. Thankfully, Alan Renouf over at virtu-al.net wrote the SnapReminder, which already helped me a lot! However, occasionally the script isn’t finding the snapshot author (for whatever reason).

Since I want a notification in that case, I modified the script a little bit to suit my needs.

Fix Path Selection Policy for a whole vCenter Cluster

These last few weeks, I’ve been toying with PowerCLI (and PowerShell for that matter). One thing I do have to say, is that Microsoft finally did it right! It’s a useable, program-able command line interface for Windows after all! Thanks to Ivo Beerens and his post “Best practices for HP EVA, vSphere 4 and Round Robin multi-pathing“, I was able to come up with the below:

This works great, however you could make it work on the whole vCenter inventory, which I don’t want. We usually add LUNs to a single cluster at one time. Only thing you might need to change, is the canonical name. Mine simply says “find all SVC LUNs” and you might need to change it, if you’re using a different storage.