Doing TSM’s job on Windows Server 2008

Ran into another weird problem the other day … Had a few Windows boxens running out of space. Why ? Well, because TSM includes a System-State backup when creating the daily incremental. Now, apparently (as stated by the IBM support) it isn’t TSM’s job to keep track of the VSS snapshots but rather Windows’. Now by default, if you don’t click on the VSS properties of a Windows drive, there is no limit on the volume. Thus, VSS is slowly eating up all your space.

That isn’t the worst of it, but when you want to delete it all … With Windows 2003 you would just this:

However, as with everything Microsoft, Windows 2008 R2 does it a little bit different. As a matter of fact, it won’t allow you to delete application triggered snapshots (as you can see in the example below), so you’re basically shit-out-of-luck.

Well, not really … diskshadow to the rescue. Simply running diskshadow with a simple script like this:

Just for clarification this isn’t my own work, it was someone elses.

Empty Port SSL after ADAM installation

I’ve been meaning to post this, but never actually got around to doing that. When installing vCenter 5.0, an instance of ADAM is installed, which stores all the configration data for Linked Mode.

It basically boils down to running this script and rebooting the box:

This is no new invention of myself, just writing it down for myself from here or here.

Rebooting a virtual machine via Task scheduler

Since the Scheduled Tasks in vCenter ain’t exportable, I went ahead and wrote a rather simple script, which lets me do this in Windows own Task Scheduler. What this script does, is initiate a graceful shutdown and if the VM isn’t shutdown within 60 seconds (12 * 5 seconds) it simply powers the VM off and immediately after that powers it back on.

Before this implementation in PowerCLI, I needed three tasks for each VM that was to be scheduled. And when migrating vCenters (and I usually do an empty install) vCenter’s scheduled tasks are not exportable, thus you need to re-create the tasks on the new vCenter by yourself again, which for more than four virtual machines is really a pain in the ass …

Update: well, found an error that caused shit not to work … Basically Stop-VM also needs the object for $VMname, otherwise the whole point of waiting for the VM to be stopped is kinda moot (seeing as Stop-VM never stops obsessing about not having a Get-VM object or a VM name to work with).

Reoccurring memory limits in vCenter

We recently had, after we migrated from vSphere 4 to vSphere 5, a memory limit in size of the configured memory on each and every VM. Since memory limits on VM level pretty much destroy performance, I went ahead an wrote this simple script to remove all memory limits on all VMs that don’t have “Unlimited” configured:

This script is basically what the guy over at get-admin.com did, just only for memory limits.

Been a while

Well, it’s been a while since I last blogged about anything. I’ve been real busy with work with the move from vSphere 4 to vSphere 5 (well planning takes a while …), reorganizing our vSphere Clusters/Farms, a lot of PowerCLI voodoo (some of it, I’m gonna post), the usual Windows honky-donky (Windows group policy for certain stuff).

Besides that, you know, I have some kind of personal life. That basically took all of my free time. So I’m gonna try to write some posts up in the next few weeks, with some PowerCLI scripts mostly, some Shell scripts for SVC-automation, as well as some NetApp foo, guess we’ll see.

Adobe CS3 on Windows 7

Well it took me exactly two full Windows reinstallations till I figured that one out, thanks to Google. Basically the Creative Suite 3 installs an mDNSresponder as system service (named “##Id_String2.6844F930_1628_4223_B5CC_5BB94B879762##" -- don't ask me why the cryptic name), which basically screws up your Windows! It lays another physical network on top of the current one and once you reboot the system you’re gonna sit there and try and figure out, why the fuck you ain’t getting a DHCP address on boot. And since a simple deactivate/activate of the nic fixes it *shrug*

So I typed some random words that came to mind into Google, and quickly found this discussion on Microsoft’s ITPro forum:

Solution to all my troubles

So, after disabling the pseudo Bonjour service, everything is fine *shrug* Guess that’s what you get by using “old” software …

 

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!

Ember MM, XBMC and 0s Video Duration

Some of you out there may know, I am using Ember MM to scrape my movies and TV episodes. One thing about that is, that Ember MM is kinda stupid doing so.

After the 9.10-release of XMBC, they apparently changed the XML format, introducting durationinseconds, which is basically like duration, just … yeah you guessed right, in seconds.

Now Ember MM doesn’t know that, and still writes the old duration-tag. Now, everytime when something goes kaboom! with my library, I do have to rescrape all my episodes and movies, which isn’t a big deal since the NFO’s are still on disk. However, since I didn’t watch them (as Ember doesn’t know about the lastplayed-tag) XBMC is not showing any runtime in the GUI. Now this isn’t annoying per se, but it was just bugging me (and since I got lots of spare time, due to being chained to the sofa).

So I ended up comparing exports of movie databases before and after playing back an episode and came up with a smallish shell script to do the rescanning and replacing of stuff for me.

Since Ember doesn’t provide anything like hooks or “post-scraping”, this is the only way I can think of doing this. If anyone has a smarter idea, I’m all ears.

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.