This week we(Frank Denneman and I) played around with vscsiStats, it’s a weird command and hard to get used to when you normally dive into esxtop when there are performance issues. While asking around for more info on the metrics and values someone emailed us nfstop. I assumed it was NDA or at least not suitable for publication yet but William Lam pointed me to a topic on the VMTN Communities which contains this great script. Definitely worth checking out. This tool parses the vscsiStats output into an esxtop format. Below a screenshot of what that looks like:
scripts
Book: VMware VI and vSphere SDK
I received Steve Jin’s book VMware VI and vSphere SDK: Managing the VMware Infrastructure and vSphere two weeks ago. For those who don’t know Steve, he is the man behind the VI and vSphere Java API which can be found here. But that’s not the topic today, the topic is the book Steve recently published. The book is available via Amazon and most other large (online) bookstores.
VMware VI and vSphere SDK takes you on a tour through the SDK trenches. Knowing the SDK is essential when scripting or programming with for instance Powershell, Perl, Java and Python.
I am not a developer and always had a tough time understanding the structure and getting my head wrapped around the “managed objects” and “data objects” concepts. Steve managed to get me on the track. I’m half way through the book right now and can already highly recommend it to everyone who wants to know more about the SDK, everyone who recently started scripted and is running into limitations of provided examples, and everyone who wants to know more about the core of vSphere / VI3.
One of the Amazon reviews that stood out to me is the following by David Rousseau:
If like me you are tired of using vSphere or VI 2.5 official SDK, this book is for you.
Steve Jin has done a great job simplifying SDK access and improving performance drastically.
After using his VI Java API described in this book, you will no longer return to official VI Java SDK or other VI Toolkit.You can code in Java but also in Python using Jython or IronPython.
We’ve choosed Jython and coupled it with some great web frameworks in python like Django. We’ve built a powerful web app exposing a RESTful API.
Add to this a real talent in popularizing VI objects in the SDK, this book saved me lots of time.
getvSwitchMacTable.pl
I’ve been following William Lam‘s VMTN account in my RSS reader for a while as William regularly releases useful scripts. Lately he has been pumping iron and releasing new scripts or new versions of scripts on an almost daily basis. One of the most useful scripts that William released lately is “getvSwitchMacTable.pl”. Make sure to add William to you RSS reader or just follow him on twitter.
This script allows you to dump information about your vSwitche(s) pertaining to the VM(s) that are attached, the portgroups in which the VM(s) are attached to and the corresponding MAC Address that maps to the portgroup/vswitch
You can specify a specific Cluster, Datacenter or if execute against vCenter without options, it will extract ALL VMs or you execute against an individual ESX(i).
in the ghetto….
William Lam just updated two of his most popular scripts. If you haven’t looked at them yet, make sure you do as they are worth it. ghettoVCB(g2) enables the backup of virtual machines residing on either an ESX or ESXi host. ghettoVCBg2 is a complete rewritten and enhanced version of ghettoVCB or as William puts it “harder, better, faster, stronger”.
11/17/09 – The following enhancements and fixes have been implemented in this release of ghettoVCBg2. Special thanks goes out to Gerhard Ostermann for assisting with some of the logic in the ghettoVCBg2 script and the rest of the ghettoVCBg2 BETA testers. Thanks for everyones time and comments to make this script better!
Enhancements:
- Email log support
- Include/exclude specific VMDK(s)
- Additional logging + dry run mode
Fixes:
- Independent disk aware
- Large VMDK backups
Original script, but updated with new features and a bug fix:
11/17/09 – The following enhancements and fixes have been implemented in this release of ghettoVCB. Special thanks goes out to all the ghettoVCB BETA testers for providing time and their environments to test features/fixes of the new script!
Enhancements:
- Individual VM backup policy
- Include/exclude specific VMDK(s)
- Logging to file
- Timeout variables
- Configur snapshot memory/quiesce
- Adapter format
- Additional logging + dryrun mode
- Support for both physical/virtual RDMs
Fixes:
- Independent disk aware
The uncrowned king of PowerCLI is Alan Renouf
No, I am not exaggerating. Alan Renouf truly is the uncrowned king of PowerCLI. Although I’ve seen some amazing scripts from other people as well Alan always seems to bring that little extra to make him stand out. No this is not an Alan Renouf appreciation blog article, although he deserves one, this article is about his two latest additions.
The first one is the Virtu-Al VESI & PowerGui Powerpack. If you are like me, not a powercli hero, this is what you were looking for all along. Alan has bundled all his script into a Powerpack which enables you to import all his scripts at once and run them with a single click. All scripts are placed into categories which makes them easy to find. Not only can you use them you can also modify them to your needs. Of course if you do improve these scripts give some feedback to Alan so that he might be able to incorporate it into the Powerpack.
The second one is Version 3 of the daily report or vCheck as it is called as of v3. I wrote about version 1 and many people have downloaded it and are using it in their environment. The script just got better and a whole set of new features have been added. Alan was smart enough to ask around in the community what his report was lacking and incorporated all these tips in Version 3 of vCheck(previously known as the Daily Report). Again, if you feel there is anything missing don’t hesitate to leave a comment and ask Alan if he can add it… Here’s the list of new features:
- Status report to screen whilst running interactively
- At the top of the script you can now turn off any areas you do not want to report on (this makes it faster to run)
- VMs on Local storage has been changed to report VMs stored on datastores attached to only one host
- VM active alerts
- Cluster Active Alerts
- If HA Cluster is set to use host datastore for swapfile, check the host has a swapfile location set
- Host active Alerts
- Dead SCSI Luns
- VMs with over x amount of vCPUs
- vSphere check: Slot Sizes
- vSphere check: Outdated VM Hardware (Less than V7)
- VMs in Inconsistent folders (the name of the folder is not the same as the name)
- Added the number of issues to each title line
Carter can you please hand over your crown to Alan?! Thanks,