Powershell: PoshOnTap meet world…

UPDATE: This project has been moved to codeplex, the latest build can be located here.

Okay… well I’ve written enough, and tested what I can… Time to let this baby go and see what happens!   PoshOnTap released!

What is PoshOnTap?  PoshOnTap is a collection of PowerShell V2 Advanced Functions to manage A NetApp Filer from PowerShell.  All in all the project contains 138 cmdlets covering everything from basic disk management to snapvaults and everything in between!

What isn’t PoshOnTap? PoshOnTap is not in anyway affiliated with NetApp… I wrote it, and I’m sure there are bugs!!!  I’ve tried my best to polish it all up, but at the end of the day use with caution…. i.e., if you break your production SAN, I don’t want to hear about it!  Additionally two glaring holes are the lack of cifs/NFS/FC cmdlets… I’ve been writing this for six months, and 20k + lines of code later I still haven’t gotten to them. I decided that if I tried to do it all in one swipe OnTap 8 would be released before I could finish.

The framework is very basic anything can be accomplished with the use of one class and a cmdlet, everything else is a wrapper to ease the administrative experience.

How to use:

  1. Download the source files from below, and extract to a location on your local machine.
  2. If your running all-signed you’ll need to sign the scripts prior to execution (sorry I can’t afford a code signing cert)
  3. from a Powershell V2 CTP3 prompt type: Import-Module <path>PoshOnTap.psd1

There is a short getting started doc to give you a rough idea, but this is all very raw…  My hope is that the community can pick this up, and bring it all that last mile.  Adam provided the idea with Powershell OnTap, and I hope I’ve provided a base!   I will blog some example uses next week, but in the interim.

Have at it!


UPDATE: this project has been superceeded by it’s big brother PoshOnTap v2 www.codeplex.com/poshontap

Read more

Find VMware snapshots via SDK

Edit 2009-02-09: I’ve updated the script slightly to reflect some errors that were occurring because I suck at regex.

I wanted a quick way of showing all snapshots for the VMs in vCenter using perl, so I spent a few minutes on this script. There are a lot of scripts for creating and deleting snapshots (and a couple to show them) using powershell, but not many using perl. I’m a *nix guy, so I wasn’t really interested in including the ability to send a mail to yourself or others in the script (just create a bash wrapper and use mail/mailx with a cron job) which saved me some time.

Well, after writing this script, I discovered that VMware included this functionality in their snapshotmanager.pl sample script, which is included with the Perl Toolkit.

Without further rambling by me, some perl….

Read more

PowerShell OnTap Cmdlets: Soooo close!

The good news, I’m almost done with the initial wave of Powershell OnTap cmdlets.  Even better I talked to Adam Weigert the author of the Powershell Ontap API wrapper, and he’s agreed to add my cmdlets to the original project.  The bad news I still have some QA to perform and documentation to complete…  In the interim, a transcript of my PowerShell session this morning!

I had the task of setting up a test LUN so Andrew and I could work on some array based snapshot’s (more to come once we figure it out).  The Names have been changed to protect my customers, but you should be able to get a feel for the cmdlets.

Read more

xVM, LDOMs, Zones: Sun’s slightly confusing SPARC virtualization offerings

One of my long term tasks has been to figure out how to effectively virtualize our SPARC infrastructure. Turns out it isn’t as easy as I originally thought it would be, mostly because of Solaris 8 and the fact that I can’t get rid of it :). Don’t ask me why (cause it irritates me to no end…) but I can not convince the stodgy Solaris 8 admins that their binaries will run in Solaris 10 without modification.

Read more

PowerShell: Format-Comments

I’ve been writing a TON of CTP3 advanced functions in the last month, and so far my favorite feature is in-line help.  The ability for me to place proper PowerShell  help files in a script… epic!  Having said that, formatting everything down to 80 char lines… is a pain in the ares.  This morning I had enough and wrote a quick filter to handle it all for me.


VMDK Partition Alignment when using NFS…is it necessary?

As the Magic 8 Ball sometimes says “Concentrate and ask again”.

I was re-reading the “Recommendations for Aligning VMFS Partitions“, published by VMware, and noticed this paragraph (on page one no less…how did I miss it before?!):

Note: These recommendations are for block-based storage solutions, not those that are IP-based. I/O characteristics on NFS are different from those of Fibre Channel and iSCSI storage systems. Though partition alignment eliminates track crossings and benefits performance on all storage platforms, the throughput improvements in specific types of I/O between SAN, NFS, and iSCSI are different.

(Emphasis added by me.)

This is fairly significant, as many administrators have devoted a large amount of time (especially during template creation) to ensure that their VMs are aligned in order to gain the benefits highlighted in the publication.

Read more

Why you should review VMware KB articles…

I have made a bit of a weekly ritual of spending some time reviewing the knowledge base articles that are updated or created by the VMware documentation team. I usually don’t have time to do it every day, so I am relegated to once a week (although, I just discovered that I can create an rss feed of them here).

Since I was off yesterday, I didn’t get to look at the articles for the last week until this morning. If you don’t care to review the full list, Dave Lawrence does an excellent job of highlighting the best of them each week.

When I did start my review, I came across this article, which has limited applicability, but is extremely important to those of us that it affects. The article is about how the BIOS apparently affects NFS performance for Dell 1950 servers…very important to those it affects, otherwise not important at all.

It’s a good idea to periodically review the knowledge base articles for those that pertain to a small crowd and don’t get wider dissemination like some others, because you never know if one might affect you in a major way.

Blades and Virtual Infrastructure: Who thought this was a good idea?

Blade servers are all the rage these days, but let’s jump back a bit and remember the original intent. Blades are a consolidation mechanism. The first blade servers consisted of more underpowered physical servers crammed into a smaller U (Rack Unit) footprint. Over time the chassis have become more redundant, and the blades have grown to equal their physical brethren, but the intent remains the same! Sounds a lot like the mission statement for virtualization doesn’t it? I have issues with Blade servers and virtualization:

  1. Most Datacenters don’t have enough PSC (Power, Space, and Cooling) to support blades.
  2. If you’re using virtualization then you already have a consolidation mechanism.
  3. Your upgrade path is fairly static, and exorbitantly expensive.
  4. Losing a blade center is too destructive to the IT organization.

Read more

Have you thought about what would happen if you lost 50+% of your capacity right now?

Disaster mitigation and recovery is a subject that is near and dear to my heart. As Glenn can attest, I am extremely conservative when it comes to datacenter design…I am a firm believer in redundant redundancy.

I have almost 100% blade centers, for better or worse, in my virtualization infrastructure. Let’s assume I have four brand new blade chassis, each with 14 blades (care to guess who they’re from?), for a total of 56 blades to assimilate. Rather than assign the blades to clusters sequentially, I wanted to ensure that the loss of a blade chassis was mitigated as much as possible. To do this, as hardware is assigned to the virtual clusters and datacenters it is taken in stripes across the blade chassis.

Read more

VIMA and ESX Password Complexity

A few days ago I posted about setting the password complexity and other items for ESX hosts. I generally don’t use VIMA for much, as I don’t have any scripts that require periodic execution without authentication, and the logging aspect of it holds no value for me (I have a syslog server for that…). For some reason (I don’t remember why now) I was fiddling with a script on my VIMA test VM and discovered a strange error…

One thing I’ve discovered about VIMA is that when a command fails (especially the vifp commands) they give entirely useless errors back. I checked the syslog server for entries regarding the ESX host I was trying to add and discovered the following:

Read more