Skip to content

Script

Nagios Check: VMware Virtual Machine Snapshot Age

As you might know it is a VMware best practice to keep snapshots for more than 24-72 hours. To monitor aged snapshots using Nagios i created a perl script that checks the whole vCenter for snapshots. The script throws a warning because i think this is still not a critical event. You can easily change the behavior by changing the exit code to 2.

I set the allowed age to 3 days, based on VMware  KB1025279. You can change the maximum allowed age to whatever you want by changing the subroutine check_age.

You can use this script as source for Nagios. There is also a multiple line output which allows you to see the virtual machine that caused the warning event.Read More »Nagios Check: VMware Virtual Machine Snapshot Age

Using SSH Public Key Authentication with vMA

If you are using the vSphere Management Assistant (vMA) on a daily bases you might want to simplify the login process. Public Key authentication is an authentication method that relies on a generated public/private keypair and enables the login without entering a password.

What do you need?

  • PuTTY (The well known SSH Client)
  • PuTTYgen (To genereate your SSH Key)
  • Pagent (The SSH authenticatien Agent, required for key authentication)

Read More »Using SSH Public Key Authentication with vMA

StackOverflowException with Update Manager PowerCLI and WMF v3

While doing some patchmanagement I faced an issue with the current Windows Management Framework 3.0 (WMF) and the VMware vSphere Update Manager PowerCLI 5.1. Everytime when i invoked one of the VMware.VumAutomation cmdlets the PowerShell crashed with an StackOverflowException:

Process is terminated due to StackOverflowException.

I couldn't locate the root cause, so i started to narrow down the problem with different operating system. After testing various systems i noticed that the problem only appears on Windows 7 Systems with WMF3 installed manually and Windows 8 Systems where WMF3 is installed by default.Read More »StackOverflowException with Update Manager PowerCLI and WMF v3

vSphere Health Check Report with ESXi 5.x (Minimum Permissions)

If you are using VMware vSphere Health Check Report v5.0.2 by William Lam in your environment you might get incomplete reports after upgrading to vSphere 5.x. This applies only when you use the script with minimal privileges set. The report is broken (missing VM and Host information) and running the script with --debug 1 throws an error message.Read More »vSphere Health Check Report with ESXi 5.x (Minimum Permissions)

Getting Started with PowerCLI 5.1 and PowerShell 3.0

In this post i am going to give a quick startup guide to the new version of PowerCLI 5.1 with the Windows Management Framework 3.0, which is available with Windows 8. Both are recently published releases of the great PowerShell scripting engine that every VMware admin should know. First i am going to give a quick guide how to set up and configure your environment. Later i am going to show the new features of PowerCLI 5.1 and PowerShell 3.0.Read More »Getting Started with PowerCLI 5.1 and PowerShell 3.0

VMware Support Upload Script

Tired from uploading VMware Support logs to VMware tickets i wanted to do this job with just one click. I wrote a script which can be used to upload files to VMwares FTP server quite fast. The script uses the FTPupload howto from KB1008525. Please open a ticket with VMware prior to start this script, to get a support request number. You need the ticketnumber to run the script.Read More »VMware Support Upload Script