Archives For VI Toolkit

Snapshot Size Report

September 1, 2009 — 2 Comments

Playing around with the Aplha release of VESI 1.2 I have created a report to show Snapshot size, see below, using the files option and a quick filter I have a snapshot size report, I don’t believe this is a new feature just a new use I have found, I believe this would also help you track down orphaned delta’s. Now to see if I can change the filesize into an easy to read format and maybe graph againt the original VMDK size.

Snapshotsize

VESI 1.2 Alpha

September 1, 2009 — Leave a comment

As I have blogged many times before I am a big fan of the Virtualization Eco Shell, it enables you to quickly produce reports and automate tasks that would have previously have taken a much longer in the past. It does this by utilising the power of Powershell with a graphical front end. Last week I was lucky enough to get a pre VMworld demo of the latest features being added to the product. Having had very little time to play with it since I will be updating this post regularly with my latest findings of the new release. One of the main additions is the ability to create charts / graphs of the data you have on screen with a few clicks.

For example a handy graph of VM memory allocation within the datacenter

VESI Memory Graph.jpeg

Datastore Usage Chart

DataStore Usage.jpeg

If you are lucky enough to be attending VMworld in San Fransico this week be sure to track down Scott Herold for a full demo.

OK all I seem to go on about at the moment is Virtualization Eco Shell and powershell, being a bit of a newbie to Powershell I have been amazed by just what I can do with it and have been eager to learn more. Whilst I have been learning and modifying code I have found on the internet, I have also started using Virtualization Eco Shell since its release.

The Virtualization Eco Shell is now the first tool I open when I get to site, I find it quicker and easier to get the information I need about an enviroment than using the VI / vSphere client.

A few examples of how I have recently used it

Reporting number of CPU’s and RAM in all the VM’s in an enviroment, using the advanced reporting pack that can be downloaded here >> http://thevesi.org/downloads.jspa within seconds I was able to produce a customised report similar to that below for a system with well over a hundred VM’s.

vmsummary2

Upon discovering a large amount of VMs we not time syncing with the host through VMware tools you would usually have to change the setting on each guest. After posting a question on the www.thevesi.org forum Scott has now added this functionality to the Virtualization Eco Shell >> http://thevesi.org/message.jspa?messageID=29595#29595

I am now able to set all my VM’s to sync at the click of a button

synctimewithhost

As for the vDiagrams they are fantastic, having previously used Veeam reporter to draw diagrams for infrastructures the vDiagrams option does it miles better and for free. Although I haven’t used the latest version of Veeams Reporter so this may have improved significantly. I just want the option to be able to diagram my network now as well! Maybe thats asking a bit much for a free product.

vmdiagram

For the latest information keep an eye on www.thevesi.org and also be sure to check out their blog here >> http://blog.thevesi.org/

For anyone looking to learn more about PowerCLI or VI Toolkit I can highly recommend watching the PowerCLI – What is new in PowerCLI by Carter Shanklin on VMware’s coffee talk webinars page here >>http://is.gd/Op6J 

For me this session was fantastic it really opened my eyes to some of the more advanced methods of getting data using PowerCLI, there are a number of commands that will assist you in day to day troubleshooting techniques.

I blogged a while ago about downloading the Virtualisation Eco Shell (VESI), since then I haven’t stopped using it. It now forms one of my tools that is opened as soon as I am dealing with VMware. VESI puts a graphical user interface over the top of the VI Toolkit / PowerCLI and powershell. Allowing you to run queries and get information out of a environment in a matter of seconds. Below is a short list of some of the ways I have used it recently. I plan on doing a more detailed blog post shortly depicting how usefull this free tool is. Big thanks must go to Scott Herold who runs the project, he has been extremly helpful  and accommodating with assistance and feature requests.

  • Quickly shutdown all VM’s when doing SAN maintainance
  • Documentation / Infrastructure Diagrams
  • Checking host log files
  • Checking for snapshots
  • Using the script editior to write, test and debug powershell scripts
  • Checking Windows service status / restarting / starting services
  • Checking Windows event logs for VMs

Plus lots more.

For more information please visit the website www.thevesi.org

A few useful VI Toolkit commands I have found / modified.

Get all Service Console IPs

 

Get-VMHost | where {$_.State -eq “Connected”} | Get-View | `

  %{$esxName = $_.Name; Get-View -Id $_.ConfigManager.NetworkSystem} | `

  %{$_.NetworkInfo.ConsoleVnic} | `

  %{Write-Host $esxName $_.Portgroup $_.Spec.Ip.IpAddress}

 

Get all VMKernel IPs

 

Get-VMHost | where {$_.State -eq “Connected”} | Get-View | `

%{$esxName = $_.Name; Get-View -Id $_.ConfigManager.NetworkSystem} | `

%{$_.NetworkInfo.Vnic} | `

%{Write-Host $esxName $_.Portgroup $_.Spec.Ip.IpAddress}

 

Get VM Free Disk Space

 

Connect-VIServer cw-vc

Get-VM | Where { $_.PowerState -eq “PoweredOn” } | Get-VMGuest | Select VmName -ExpandProperty disks  | Select VmName, Path, @{ N=”PercFree”; E={ [math]::Round( (100 * ( $_.FreeSpace / $_.Capacity ) ),0 ) } } | Sort PercFree