Windows
 

Windows Server 2012 : Hyper-V - Performance and Virtual Network Management - Resource Metering

3/6/2014 1:34:17 AM

Besides creating and managing VMs, system administrators are also responsible for monitoring the performance and health of VMs, just as with physical machines.

Hyper-V delivers not only improvements in monitoring virtual environments, but also new features that are worth getting familiar with.

Resource Metering

Resource metering is a new feature that gives you information on the CPU, memory, storage, and network resources that a VM is consuming. Consider it a Performance Monitor for virtualization.

Besides giving insight into how well or poorly a virtual infrastructure is running, resource metering provides another important purpose: customer billing. As companies increasingly provide services to customers via cloud deployments, they need a way to bill those customers for service usage. With resource metering, a business can create an in-house strategy for billing customers for usage based on metrics provided. Previously, most companies had to rely solely on third-party solutions to bill for cloud services.

Resource metering provides:

  • Average CPU usage, measured in megahertz over a period of time

  • Average physical memory usage, measured in megabytes

  • Minimum memory usage (lowest amount of physical memory)

  • Maximum memory usage (highest amount of physical memory)

  • Maximum amount of disk space allocated to a virtual machine

  • Total incoming network traffic, measured in megabytes, for a virtual network adapter

  • Total outgoing network traffic, measured in megabytes, for a virtual network adapter

To execute resource metering, run the following cmdlet in PowerShell (see Figure 1):

Get-VM -ComputerName <name of Hyper-V host machine>|Enable -VMResourceMetering
Resource metering cmdlet
Figure 1. Resource metering cmdlet

The default time to collect data for performance metrics is an hour. You can change this interval. The following cmdlet sets the data collection time to under a minute:

Set-vmhost –computername <Hyper-V host name> 
-ResourceMeteringSaveInterval 00:01:00

To display all the data collected for VMs, run this command (see Figure 2):

Get-VM –ComputerName <name of Hyper-V host>|Meaure-VM
Displaying the Resource metering data
Figure 2. Displaying the Resource metering data

You can also just get metrics on a specific VM. In the following example, we specify a VM named Server2012VM on a Hyper-V host, DC10:

Get-VM –ComputerName DC10 –Name "Server2012VM"|Measure-VM

Since cloud computing is at the forefront of Server 2012 and Hyper-V R3 marketing, there’s a good chance that organizations will take a close look at the two solutions if they do have billable cloud services. Resource metering is a good way to see usage within a virtualized environment, but Microsoft’s options for exporting the data you get from running these PowerShell commands is rather weak. I would prefer a GUI component that provides rich reporting and data visualization capabilities. Currently, the best way I can determine to extract data when you run resource metering cmdlets is to use the output command to create a CSV (comma-separated value) file.

 
Others
 
- Windows Server 2012 : Hyper-V - Managing Virtual Machines and Virtual Disks (part 3) - Cloning Virtual Domain Controllers, Merging Snapshots
- Windows Server 2012 : Hyper-V - Managing Virtual Machines and Virtual Disks (part 2) - Hyper-V Replica
- Windows Server 2012 : Hyper-V - Managing Virtual Machines and Virtual Disks (part 1) - Live-Migrating Virtual Machines
- Windows Server 2012 : Hyper-V - Creating and Configuring Virtual Machines (part 2) - Creating Virtual Machines
- Windows Server 2012 : Hyper-V - Creating and Configuring Virtual Machines (part 1) - Configuring Virtual Disks
- Windows Server 2012 : Hyper-V - Installing the Hyper-V Role
- Windows 8 : Sharing and Securing with User Accounts - Creating and Using Password Reset Disks, Running Programs as Administrator
- Windows 8 : Sharing and Securing with User Accounts - Using User Accounts (part 2) - Turning UAC on and off
- Windows 8 : Sharing and Securing with User Accounts - Using User Accounts (part 1) - Understanding User Account Control
- Windows 8 : Sharing and Securing with User Accounts - Deleting User Accounts
- Windows Server 2012 : Business continuity for virtualized workloads (part 2) - Guidance on configuring the Hyper-V Replica Broker cluster resource
- Windows Server 2012 : Business continuity for virtualized workloads (part 1) - Implementing Hyper-V Replica
- Windows 8 : Sharing and Securing with User Accounts - Creating and Managing User Accounts (part 6) - Navigating through user account pages
- Windows 8 : Sharing and Securing with User Accounts - Creating and Managing User Accounts (part 5) - Changing the account picture
- Windows 8 : Sharing and Securing with User Accounts - Creating and Managing User Accounts (part 4) - Changing a user account type , Password-protecting an account
- Windows 8 : Sharing and Securing with User Accounts - Creating and Managing User Accounts (part 3) - Creating a new e-mail address for a new user account
- Windows 8 : Sharing and Securing with User Accounts - Creating and Managing User Accounts (part 2) - Creating a Microsoft user account
- Windows 8 : Sharing and Securing with User Accounts - Creating and Managing User Accounts (part 1)
- Windows 8 : Sharing and Securing with User Accounts - Types of User Accounts
- Windows 8 : Sharing and Securing with User Accounts - Picture Passwords
 
 
Most View
 
- Microsoft Visio 2010 : Working with SharePoint - Working with Files in Document Libraries
- SQL Server 2012 : Configuration Options (part 12) - Database-State-Configuration Properties
- Windows 8 : Navigating the Windows 8 Folder Windows (part 1) - Folder Navigation
- Active Directory 2008 : Overview of Active Directory Replication and Sites
- Windows 8 Explorer : Searches
- SQL Server 2012 : Configuration Options (part 8) - Configuring Database Auto Options
- Windows 8 : Customizing the Start Screen (part 2) - Creating an App Group
- Adobe InDesign CS5 : Working with Frames and Shapes - Understanding Frames Versus Shapes
- Microsoft Sharepoint 2013 : Using SharePoint Commands (part 1) - Working with the Farm, Working with the Farm Configuration
- Microsoft Project 2010 : Setting Up Project for Your Use - Defining Calendars (part 1) - Calendar Hierarchy , Modifying and Defining Base Calendars
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Sophistication to Your Drawings - Understanding and using layers
- Microsoft Visio 2013 : Adding Sophistication to Your Drawings - Inserting pictures
- Microsoft Excel 2010 : Filtering Options (part 3) - Using the Search Function for Grouped Dates, Using Text, Number and Date Special Filters
- Microsoft Excel 2010 : Filtering Options (part 2) - Searching Functions for Listed Items
- Microsoft Excel 2010 : Filtering Options (part 1) - Filter Listing for Listed Items, Grouped Dates Filter Listing
- Microsoft Excel 2010 : Filtering and Consolidating Data - Preparing Data, Applying a Filter to a Dataset
- Microsoft PowerPoint 2010 : Inserting Charts and Related Material - Formatting a SmartArt Graphic
- Microsoft PowerPoint 2010 : Inserting Charts and Related Material - Resizing a SmartArt Graphic
- Microsoft PowerPoint 2010 : Inserting Charts and Related Material - Modifying a SmartArt Graphic
- Microsoft PowerPoint 2010 : Inserting Charts and Related Material - Using the Text Pane with SmartArt Graphics