Measure-VM – Its just amazing !

Some times, its nice to see how a particular VM is performing through a commandlet. I am sure, you know this. Get-VM will give you a quick overview on the resource utilization at that moment.

Get-VM -ComputerName HyperVHostServver

Get-VM

How about getting an average performance report. Its possible in Windows Server 2012 HyperV. We can measure the average value of specific performance counters. The first step to achieve this is to enable resource metering.

By default, Resource metering is set as false for all VMs.

Get-VM-RM-Default

Resource Metering can be enabled for a specific VM or for all VMs on a server in one time. Once you enable Resource Metering, key counters are captured and will give use an option to generate an average utilization report.

To enable Resource Metering for a specific VM

Enable-VMResourceMetering -ComputerName HyperVHostName -VMName VMName

To enable for all VMs on a server

Enable-VMResourceMetering -ComputerName HyperVHostName-VMName *

Enable-RM

To check if a VM is configured with Resource Metering, Use Get-VM

Get-VM VMName |Select-Object ResourceMeteringEnabled

Get-VM Resource-Metering-Enabled

To check the total time duration resource metering is running, use Measure-VM with FL

Measure-VM

At last, to disable resource metering

Disable-VMResourceMetering -VMName VM

Hope that helps !

Shaba