Sunday, October 16, 2011

We were having performance issues wtih Netapp filer in our production environment.  We suspected that there may be problem with disk alignment (check out yellow brick's post regarding disk alignment) and VMs with high disk I/O. I was asked to provide VM I/O report for the VMs that are on the datastore.  Unlucky for me, our production environment is on ESX 4.0 and this version does not have VM I/O vSphere API.  VM I/O is availble from ESX(i)4.1 and up.  Since Tivoli was our choice for server monitoring, I had to turn to Tivoli IT guys for help.  They were able to produce the I/O report for me.  So, IF we were on 4.1, how would I pull the information for VM disk I/O?

Lets take a look what is available for Virtual Machine monitoring from vSphere API.



Counter is type of stat you will be using to look up disk I/O.  Levels is the monitoring level that you can define on vsphere.  Level "2" is the minimal requirement for this counter to work.  Finally, this entity is for for virtual machine only.

If vSphere logging level is set to less than 1, these stat types are not available.  See examples below.


Get-StatType cmdlet will give you type of stats that are available for the entity.
You should use any vm name that is up and running in the environment.


Get-StatType -entity (get-vm vmnamehere)

Level 1 logging does not provide much logging and as you can see from the screenshot, virtual disk I/O is missing from the avaiable monitoring list.

vSphere level 2 logging will provide more performance stats at the expense of more SQL disk usage.

Get-StatType -entity (get-vm vmnamehere)


Virtual disk montoring is avaiable for the VM along with alot more monitoring types.  Other monitoring types is cut-off from the screenshot because list was too long.

So, How do we apply new found stats for virtual machines?  We use Get-Type cmdlet to get the job done.
Example below will pull the stat data from 10/11/2011 to today's date.

>Get-Type -entity (get-vm vmnamehere) -stats virtualdisk.read.average -start 10/11/2011 -finish (get-date)




Saturday, October 15, 2011

First blog post

I don't know who is reading my first post.  But if you are reading this, you've just won $10,000.  Okay, I'm kidding.  On this blog, I will be focusing on VMware technologies and scripting with PowerCLI.  Couple of months ago, I didn't know jack about Powershell and PowerCLI.  Now, I can script with confidence and picked up few tricks and tips along the way.  Virtual, LucD, Reuben, and PowerCLI bloggers around the world inspired me to push further in to the world of scripting and automation.  I hope to share my knowledge and be helpful to you to get what you need in the world of virtualization.