PowerCLI: Reconnect VMhosts after changing vCenter certificates

If you have ever changed the vCenter server certificates, you’ve experienced having all your hosts disconnected from vCenter.  I couldn’t imagine reconnecting them one at a time… You could do this all natively in PowerCLI, but that would require you to fully remove and then add the hosts.  That is very inconvenient, and almost as much trouble as doing it by hand… In this case it is both faster and easier to just use the native vSphere API.

~Glenn

PowerCLI: Configure iSCSI one-liner

While migrating a small environment to vSphere today I ran into my nemesis Host Profiles again. When are they going to Fix these things? The fact that they are incapable of even rudimentary iSCSI configuration is embarrassing. I’m sure vmware will fix it, but until then I wrote a simple one-liner that will configure iSCSI on a new host.

~Glenn

Monitoring for orphaned snapshots left by SMVI

NetApp’s SnapManager for Virtual Infrastructure (SMVI) is a great product, but it’s messy. If it encounters the any error, it seemingly forgets to delete the virtual machine snapshots from the Virtual Infrastructure before dying.

To prevent many orphans (I’ve seen as many as 20 on a single virtual machine) from happening, I created a quick Nagios check that simply alerts when it sees them.

This script is very elementary. It very simply uses a regex to check for any snapshots that match the default SMVI naming convention. For each one it finds, a counter is incremented. If any are found, the script returns an error to Nagios, which causes an alert to be sent.

I’ve set the check to execute once an hour in my environment, as I don’t feel that granularity finer than that is needed…an hour’s worth of change is ok for an SMVI snapshot for me.

Color me astonished!!

I’ve been out of touch for most of this week, having only been able to be connected for an extended period of time today, and from somewhere out in left field I received an extremely surprising email from Mr. John Troyer…

I have been named a 2010 vExpert! Words can not describe how honored I am to receive this designation, I feel truly humbled by the others that have received the award and I can only hope that when I grow up I can be like them.

Thank you again to John Troyer and his team for this privilege!

Andrew

Winner, winner, chicken dinner

I WON!  If you haven’t heard, I won the big prize for the Scripting Games this year.  First place landed me a ticket to TechEd North America! I had a hell of a time getting the time off work, and getting my travel authorized, but it all worked out… Below is my agenda for the conference, feel free to contact me via twitter… with the short lead time I have Nothing scheduled (Feels kind of weird to just be going to a show…)

I should be near anything that says PowerShell in between sessions.

Monday, June 7

9:00 AM – 10:30 AM
KEY01 Tech·Ed North America Keynote Presentation

1:00 PM – 2:15 PM
WSV07-INT New Remote Management Technologies in Windows Server 2008 R2

2:45 PM – 4:00 PM
WSV334 Windows Server 2008 R2: Tips on Automating and Managing the Breadth of Your IT Environment

4:30 PM- 5:45 PM
MGT308 Microsoft System Center Configuration Manager v.Next: Overview

Tuesday, June 8

8:00 AM – 9:15 AM
WCL304 Best Practices Guide to Managing Applications

9:45 AM – 11:15 AM
KEY02 Business Intelligence Conference Keynote Presentation

1:30 PM – 2:45 PM
WCL313 Paradigm Shift: Microsoft Visual Basic Scripting Edition to Windows PowerShell

3:15 PM- 4:30 PM
MGT309 Microsoft System Center Configuration Manager v.Next: Software Distribution

5:00 PM – 6:15 PM
DAT203 Managing Microsoft SQL Server: For the "Reluctant" DBA

6:15 PM
WCL318 Using Windows Preinstallation Environment (PE) 3.0 to Troubleshoot and Fix Problems, and to Capture and Deploy WIM Images

Wednesday, June 9

8:00 AM – 9:15 AM
SIA333-R Useful Hacker Techniques: Which Part of Hackers’ Knowledge Will Help You in Efficient IT Administration? (repeated from 6/8 at 3:15pm)

9:45 AM – 11:00 AM
WSV319 Manage Your Enterprise from a Single Seat: Windows PowerShell Remoting

11:45 AM – 1:00 PM
WSV301 Administrators’ Idol: Windows and Active Directory Best Practices

1:30 PM – 2:45 PM
WSV313 Failover Clustering Deployment Success

3:15 PM – 4:30 PM
DAT407 Windows Server 2008 R2 and Microsoft SQL Server 2008: Failover Clustering Implementations

5:00 PM – 6:15 PM
MGT306 Microsoft System Center Configuration Manager v.Next: Hierarchy Design

Thursday, June 10

8:00 AM – 9:15 AM
SIA334 The Secrets of Effective Technical Talks: How to Explain Tech without Tucking Them In!

9:45 AM -11:00 AM
WCL06-INT Using Windows PowerShell for Enterprise Desktop Automation

1:30 PM – 2:45 PM
WCL314 Windows Sysinternals Primer: Process Explorer, Process Monitor, and More

3:15 PM – 4:30 PM
WSV401 Advanced Automation Using Windows PowerShell 2.0

5:00 PM – 6:15 PM
WCL315 The Case of the Unexplained, 2010: Troubleshooting with Mark Russinovich

6:30 PM – 11:00 PM
TechEd Party

See you all there! I’m the chubby white guy with a beard.

~Glenn