Archive for the ‘VI Toolkit / Powershell’ Category

EMC PowerShell Toolkit released

October 5th, 2010

dWhile pursuing twitter this evening I stumbled across a few tweets from people I follow @sakacc, @scott_lowe and @emccorp about a new EMC PowerShell toolkit.  I’m actually a little surprised that it’s taken EMC this long especially with the success of the VMware PowerCLI. Its worth noting that EMC’s competitors have had offerings in this space for some time now. Compellent’s PowerShell toolkit has been available since late 2008 and NetApp’s PowerShell offering was announced earlier this year. I’m not going to hold it against EMC though, they are the current kings of innovation and who can blame them for dropping the ball slightly on the PowerShell front.

So the story goes that the EMC ® Storio Powershell Toolkit (PSTookit) has been available internally within EMC for a while now.  EMC are now looking to increase it’s exposure by releasing a pre-release version of the EMC PSToolkit for testing and feedback.  At present it only consists of a small subset of commands which you can see in the screenshots below.


There are a few Caveats that you need to be aware of for this pre-release version. The requirements below are taken directly from the EMC community post, I have included links for the downloads to make life a little easier.

  • SMI-S Provider 4.1.2 or later versions – EMC PowerLink logon required
  • PowerShell 2.0 CTP3 – CTP3 is quite old and not available anymore, link to 2.0 provided
  • .Net Framework 3.5 – Advice is to utilise Windows Updates to update .NET Framework
  • Windows XP, Windows Server 2003, Windows Server 2008, or Windows Server 2008 R2 for Array management commands. It is known that the 32-bit cmdlet set does not execute properly on Windows 7 and may not execute properly on Windows Vista.


Of course you will also need to download the EMC PSToolkit as well, You can find this over on the EMC Community site – Remember to provide your feedback to EMC, you have their attention! What do you want to see added in here, what do you want to script, what are your use cases?

VI Toolkit / Powershell, VMware ,

VMware Snapshot Alerting and Reporting

June 21st, 2010

I spotted an issue in my vSphere infrastructure this weekend just past. I noticed that one of the main development boxes was showing the dreaded question, redo log out of space, retry or abort?


As it turned out VMware Data Recovery Manager had taken a snapshot as part of it’s back up routine and had failed when trying to remove it.  This coupled with a scheduled SQL maintenance plan caused the delta files for the snapshot to grow to over 250GB in little over 12 hours.

I eventually overcame the issue by adding an extent to the out of space VMFS datastore, this gave me an extra 160GB with which to play the logs back in.  I then used the very handy SnapVMX utility to tell me how much space was required to replay the delta files.  Luckily for me it only required 20 GB as sometimes it can require as much as the size of the original disk. After the snapshot was merged I did a bit of Storage vMotion and reworked the datastore to get rid of the extent (I’m not a fan of using them)

This particular incident was unfortunately unavoidable, it happened at a weekend, was due to VMDR’s failure to remove a snapshot it had created and unfortunately clashed with a disk intensive operation. It did get me thinking though, although I am careful with snapshots and there usage who else in the organisation is not? how do we mitigate this potential risk?

Snapshots are a handy feature, I generally only use them for short periods of time, usually to provide a rollback when patching or changing configurations. Misuse or mismanagement of snapshots can quite quickly lead to problems, something that a recent blog article from VMware Support deals with quite effectively. Entitled ESX Anatomy 101 it’s a must read for anyone trying to gain a good basic understanding of how VMware snapshot work.

I myself have taken a two pronged attack to preventing snapshots causing problems. The first approach is to schedule a very basic PowerShell script that I found on the blog site of Axiom Dynamics.  This simple little script queries your vCenter server for all current snapshots and then sends an email detailing them.  A simple but effective means of keeping an eye on snapshots across the virtual infrastructure.

The second more proactive approach is to use a vCenter alarm at the data centre level to alert when a VM is running from a snapshot. This alarm simply involves emailing a warning when any snapshot is larger than 2GB. This handy video taken from VMware Knowledgebase article 1018029 describes in detail how to set this up, the KB itself also provides step by step instructions.


There are a number of alternatives available for reporting on snapshots.

Alan Renouf’s Snapshot Reminder – A Powershell script that integrates with AD to send the creator of a snapshot a little reminder when the snapshot is over 2 weeks old.

Alan Renouf’s vCheck Daily Report – Another Powershell script that reports on a large number of areas within the virtual infrastructure.  One of those areas includes snapshots

RVTools – A very handy .Net application by Rob de Veij  that can be used to query your virtual infrastructure for just about everything. You will notice in the screenshot below the vSnapshot tab which should help you identify those rogue snapshots.


In summary,  everyone who works with snapshots should have an understanding of their usage and limitations.  Obviously you can’t always rely on people to do things right, we are only human after all. As a safeguard ensure you have some level of reporting and alerting in place to help you prevent those annoying and time consuming out of space issues occurring.

VI Toolkit / Powershell, VMware , , ,

Project Onyx – Alpha Build Release

December 11th, 2009

Just before this years VMworld event I wrote about a Project Onyx which was being run by Carter Shanklin over at VMware.  It was in it’s early stages back then and to be honest I haven’t looked back at it for a while, until today.

I got a comment today on my original article from Ben Neise who works over at Dell in Glasgow.  He kindly informed me that the Alpha edition of Project Onyx had been released and can be downloaded by clicking the link.  Project Onyx Alpha Release

Carter has produced a very quick video on the basic usage of the new alpha release. I’ll be taking a closer look at this myself when I get into the office tomorrow, hopefully this is the kick start my VMware CLI scripting needs.

VI Toolkit / Powershell, VMware ,

VMware Project Onyx – Turn vSphere Mouse Clicks into PowerCLI

August 31st, 2009

I stumbled across a tweet the other day by Carter Shanklin who I hope most of you know. For those that don’t, Carter Shanklin  is a product manager over at VMware specialising in the VMware PowerCLI and other automation tools.

His tweet was about a new project called Project Onyx, which on initial inspection is a tool that allows you to see and capture the powershell code behind actions in vSphere vCenter.  This project is at a very early stage as you will probably see in the video embedded below, however this is a very exciting development for those new to PowerCLI.

Some time back I sat my Hyper-V MCTS exam and one of the things I really liked about Microsoft’s SCVMM product was the ability to see the powershell behind the actions you were carrying out.  It was like a head start on powershell automation, giving you a chance to see what was happening, allowing you to dissect, copy it and re-use it however you wanted.

I’m hoping that VMware are planning something similar here,  perhaps a plug-in for vCenter! I personally struggle sometimes with the PowerCLI and the syntax, etc.  If I could see the code behind an action I was trying to automate a good part of the work would be done already.

This project is currently in the early stages of development.  In order to get this project up and running VMware are looking for people to help them Beta test project Onyx.  They have put the call out for a handful of “dedicated people with a burning need for automation”

Get yourself over to VMworld session VM2241 with your business card and put yourself forward to help this promising looking project gain some traction.

VI Toolkit / Powershell, VMware ,

Virtu-Al’s PowerShell VMware Daily Report

July 16th, 2009

For those of you that will have heard of Alan Renouf you will undoubtedly know of his talents in the dark art of VMware CLI / Powershell.  For those of you who don’t know him I suggest you check out his web site  to sample some of the many great articles and scripts he’s already produced.

His latest powershell creation has recieved a lot of attention in the last couple of days and with good reason. The Daily Report is a configurable script where you can set thresholds and variables such as snapshot age, datastore space free thresholds or number of days to look at for vCenter warnings and errors.  The script when run goes off and examines your Virtual  Infrastructure based on these variables and then proceeds to email you a nice html report on the following items.

·         VMs created in the  x number of days and who created them.

·         VMs deleted in the  x number of days and who deleted them.

·         Datastores which have less than x% of free space remaining.

·         VMs that have CD-Rom or Floppy drives connected.

·         VMs with no VMware Tools installed.

·         Snapshots that are older than x number of days.

·         Current state of vCenter Services.

·         vCenter events that have been logged in x number of days.

·         Windows events  on the vCenter server that relate to VMware.

·         Hosts in maintenance mode or a disconnected state.

Get yourself over  to Alan’s site and download a copy of the script and give it a try,  I did today and the results were enough for me to go ahead and implement this as a scheduled task.  If you’d like to see more features in Alan’s Daily Report script then give him some feedback,  there are a few good suggestions on the blog post already and I’m sure the next version isn’t far away.  Great work Alan, keep it up!

ESX, vCenter, VI Toolkit / Powershell, VMware , ,

VIToolkit V1.5 Released – New feature videos

February 11th, 2009

I’m a bit behind at present due to intense work commitments, but I always have time to have a quick look through my google reader at the end of the day to catch up on the latest happenings out there.

At the end of January VMware announced the release of the VIToolkit V1.5, introducing 32 new cmdlets, enhacing existing cmdlets and fixing ton’s of bugs (there words not mine).  Download the latest version of the VIToolkit V1.5 today and give it a try, for those looking to play spot the difference you can read the fine print in the release notes.

To go along with this release Carter Shanklin who blogs on the VIToolkit VMware blog has released a number of videos over on Vimeo.  These show off some of the new features and improvements made in the latest version and I have included a couple of them below. Now if you’ve never seen VIToolkit or powershell before,  these videos are a great introduction and really show the potential of powershell for automation.  Hell in some cases I can see it being easier for conducting day to day management of some tasks,  now I just have to find the extra time to immerse myself in all things VI powershell.  Easier said than done!!!

HA and DRS in VI Toolkit 1.5 from Carter Shanklin on Vimeo.

Some important fixes in VI Toolkit 1.5 from Carter Shanklin on Vimeo.

If you want to see more of Carter’s video’s check them out over on his video page at vimeo

VI Toolkit / Powershell

VI Perl and Powershell VMWorld labs

January 15th, 2009

Following my Powershell and VMware infrastructure article the other day,  I wanted to let everyone know about this great post I saw this morning in my Google reader.

VMware’s David Deeths has dropped a post on the VMware Developer Center blog entitled “An introduction to scripting VI using PERL or Powershell” This gives people the oppurtunity to download the VI Scripting labs content from VMWorld 2008.  This appears to have been very popular at VMWorld judging by the commnets below,  so I’m hoping it will prove useful to all those beginning their Powershell experience.

The labs will help you get started with scripting VMware Infrastructure to enable automation, extensibility, and integration with existing tools. When we ran this at VMworld, we had about 600 attendees and it was so popular some students camped out in line to attend the lab a second time. We had so many folks request a way to share this with their teams that we decided to publish the whole thing for the community

VI Toolkit / Powershell

Powershell and Vmware Virtual Infrastructure

January 13th, 2009

There has been a lot of chat recently around the virtualisation Twitter community about the benefits of Powershell.  A lot of people have been asking whether or not they should switch scripting languages and dive into learning Powershell. Opinion appears to be varied as a lot of people are successfully using  languages such as Perl for VMware scripting and see no need to change.

I’ve only dabbled with Powershell a little,  primarily when the VI toolkit was released as I was intrigued  as to what it could do, I wasn’t disappointed. I’ve now decided to knuckle down and attempt to learn the Powershell basics by reading the Windows Powershell scripting guide. This book primarily covers Powershell from a Microsoft perspective but the principles should stand firm for VMware Powershell scripting,  I’ll just have to dedicate some time to experimenting with the VI toolkit  a little more.

Once I’ve worked my way through the Microsoft book, I’ll be looking to purchase Hal Rottenberg’s “Managing VMware with Windows Powershell” when it’s eventually released.  Virtu-Al conducted a technical review of the book and has written a blog post detailing his thoughts on this much awaited book. Sounds like just what’s needed to progress on the VMware automation skill set.

So what evidence is there that Powershell is taking over as the scripting language of choice.  Well the following little snippets of news certainly indicate that Microsoft are putting their weight behind it and in essence basing their key platforms upon it.


When you throw into the mix the continued development of the VI toolkit, powershell for Citrix and SAN vendors like Compellent getting in on the action, Powershell is rapidly gaining a foothold.

So where do I start?

So Powershell is where you want to be, we’ve established that.  so where should you start? Here are a few links to get you (and me) started with Powershell.

Download the one of the following versions of Windows Powershell

Windows PowerShell V1.0 or Windows Powershell V2.0 CTP3 (this is a pre-release version)

Download the following from Toolkit from VMware

Vmware Infrastructrue Toolkit V1.0 Update 1

Check out some of these sites on how to get started with Powershell

Microsoft Getting started with Powershell guide

Microsoft Powershell V1.0 Documentation pack

MSDN – Getting started with Powershell guide

Check out some of these sites for tips on how to get started with Powershell and VMware

Virtu-Al’s getting started with the VI Toolkit blog post

Managing Vmware with Powershell FAQ document

VMware Communities VI Toolkit site

Some Scripts to give you a taster of what is possible

Eric Seiberts top 10 Powershell scripts for Virtual Infrastructure

VMWorld 2008 VI Toolkit scripting contest winners

Some handy links to help you on your Powershell quest

Hugo Peeters – A one man scripting machine

Hal Rottenberg – Techprosiac blog site

Vmware VI toolkit Blog site

Windows Powershell Blog Site

The PowerShell Twitterers list courtesy of Mind of Root


Microsoft, VI Toolkit / Powershell, VMware

Compellent – PowerShell Storage Automation

December 15th, 2008

Was reading through my RSS feeds this morning while standing in line for a coffee (I love the iPhone) and came across Eric Sloof’s article on Compellent.

Compellent have introduced a powershell based command set to compliment their storage offering.  Now offering the ability to script a lot of the everyday CLI based tasks in a format that is becoming more and more popular.  For me the main benefit I can see is from an integration angle,  linking in windows and storage tasks together is the kind of thing that I can see becoming handy for BCP and DR scripting.

I had a small smile on my face when reading Eric’s article and I will tell you why,  I’ve recently been looking at Compellent for a solution I was building.  Compellent really impressed me with their offering, SAN simplified as far as I was concerned.  The fact that they started from scratch 4 years ago and heavily utilise software management, means that they’re not limited in the same way as some of the other legacy based vendors.  We didn’t end up choosing Compellent for the solution, however the choice was not based purely on the technical angle.  Compellent are still quite small in the UK but do seem to be making serious inroads into the market.  The awards they picked up this year are very impressive and I will be keeping an eye on their growth in the future.

The introduction of powershell to their offering I think shows what a good dynamic company they are. Be interested in any comments anyone has on working with Compellent or their solutions.

New Products, Storage, VI Toolkit / Powershell , ,

VI Toolkit & Powershell

September 24th, 2008

I’ve been meaning to look at Powershell for sometime now,  they’re always showing it off at Microsoft roadshows!!  So when I saw that Vmware had release the VIToolkit I thought now would be the perfect time to finally do something about it.

I’ve not been dissapointed,  I’ve been highly impressed by some of the entries in the VI Scripting contest and have been looking through and trying out some of the entries. You can find all the entries at the link below and the second link is the VI toolkit blog which is a great source of info and also includes the results from the competiton.

One of the ones that I have used and got immediate benefit from is Chris Uys snapshot finding script.  Imagine my horror when It reported it had found a 153Gb snapshot on a test database server from April this year. It was swiftly deleted and the script is one I will be using on a regular basis to ensure we’re managing the snapshots correctly.  You can find the link to the script below.

VI Toolkit / Powershell , , , , ,