12. Which of the following is true if you enable shielding and create a shielded VM in WindowsServer 2016? (Choose all that apply.)
Show Applies To: Windows Server 2012 R2, Windows Server 2012 IT organizations need tools to charge back business units that they support while providing the business units with the right amount of resources to match their needs. For hosting providers, it is equally important to issue chargebacks based on the amount of usage by each customer. To implement advanced billing strategies that measure both the assigned capacity of a resource and its actual usage, earlier versions of Hyper-V required users to develop their own chargeback solutions that polled and aggregated performance counters. These solutions could be expensive to develop and sometimes led to loss of historical data. To assist with more accurate, streamlined chargebacks while protecting historical information, Hyper-V in Windows Server 2012 introduces Resource Metering, a feature that allows customers to create cost-effective, usage-based billing solutions. With this feature, service providers can choose the best billing strategy for their business model, and independent software vendors can develop more reliable, end-to-end chargeback solutions on top of Hyper-V. Key benefitsHyper-V Resource Metering in Windows Server 2012 allows organizations to avoid the expense and complexity associated with building in-house metering solutions to track usage within specific business units. It enables hosting providers to quickly and cost-efficiently create a more advanced, reliable, usage-based billing solution that adjusts to the provider's business model and strategy. Use of network metering port ACLsEnterprises pay for the Internet traffic in and out of their data centers, but not for the network traffic within their data centers. For this reason, providers generally consider Internet and intranet traffic separately for the purposes of billing. To differentiate between Internet and intranet traffic, providers can measure incoming and outgoing network traffic for any IP address range, by using network metering port ACLs. Virtual machine metricsWindows Server 2012 provides two options for administrators to obtain historical data on a client's use of virtual machine resources: Hyper-V cmdlets in Windows PowerShell and the new APIs in the Virtualization WMI provider. These tools expose the metrics for the following resources used by a virtual machine during a specific period of time:
Movement of virtual machines between Hyper-V hosts—for example, through live, offline, or storage migrations—does not affect the collected data. See AlsoHow to use Resource Metering with PowerShell
“Resource Metering” is a brand new feature in Hyper-V 3.0, included with Windows Server 2012. It allows Hyper-V administrators to track CPU usage, RAM and the network utilization of VMs working on a host. Since more companies are providing users with an Infrastructure as a Service (IaaS) and Platform as a Service (PaaS) plans, Hyper-V’s resource metering may be helpful for analyzing VM impact on a system and for calculating chargebacks to VM’s end-users accordingly. Today, I’m going to talk about practical examples of resource metering and how it can provide you with better visibility into Hyper-V resources. Note 1: Keep in mind that enabled resource metering might make some insignificant impact on disk and CPU performance as the data is saved to the configuration file. Note 2: Don’t mix it up with a “metered connection” in Windows 8/8.1. Unlike the majority of Hyper-V features, there is no GUI to play with. This feature will primarily use PowerShell cmdlets instead. Not a problem, right? Open a PowerShell console in elevated mode and use the Enable-VMResourceMetering Windows PowerShell cmdlet to get started (as resource metering is not enabled by default): Get-VM -Name vmname | Enable-VMResourceMetering where vmname is a name of a desired VM. Figure 1. Enabling resource meteringThere will be no indication that it’s enabled, which I, personally, find rather confusing. So double check everything is alright. Next command lists all VMs with enabled resource metering: Get-VM | Format-Table Name, State, ResourceMeteringEnabled Figure 2. Checking whether resource metering is enabled for VMsAs you can see, win10 VM is shown as one with enabled metering. In general, resource metering allows you to record the following information:
Let’s run the Measure-VM cmdlet now and check the measured values in my lab. Following command lists all VMs on this host and displays resource metering, when enabled: Get-VM | Measure-VM Win10 VM has recently got new updates, consumed some traffic and I can clearly see that from the listed output. To show only this VM data execute: Get-VM -Name win10 | Measure-VM Figure 4. Show resource metering for a specified VMTo check only preconfigured VM metrics: Get-VM -ComputerName localhost -Name “win10” | Measure-VM | Select-Object VMname, AvgCPU, AvgRAM Figure 5. Show selected metrics for a specified VMTo get an extended list of VM metrics: Get-VM -ComputerName localhost -Name “win10” | Measure-VM | Select-Object * Figure 6. Show extended list of VM metricsThere is a default interval of an hour when the Hyper-V host saves the metering information. You can’t decrease this interval, but can increase it by using the following cmdlet Set-VMHost -ResourceMeteringSaveInterval hh:mm:ss where “hh:mm:ss” is the desired time frame In the following example, I tried to set up 30-minute, 1-hour 1-minute 1-second and 2-hour intervals. See what happened: Figure 7. Changing resource metering save intervalOnce you enable resource metering, the Hyper-V host is gathering data unless you reset it. That can be done by running: Get-VM -Name vmname | Reset-VMResourceMetering After that, all the previously collected data is purged. As soon as you played enough with resource metering, don’t forget to disable it: Get-VM | Disable-VMResourceMetering Although you can extract data using the Measure-VM cmdlet, you need to use another solution to output this data into a visual form like a graph or use any 3rd party tool like Veeam Task Manager for Hyper-V. Veeam Task Manager for Hyper-VIf you feel, what was described above wasn’t that easy for you or you’re not a scripting person and like to see things more clear, here’s another tool worth checking out: Veeam Task Manager for Hyper-V. It gathers a bit less information to present to the administrator, but it has a small size (1Mb) and doesn’t require installation (portable), so it can work right from an attached USB drive. This program displays real-time CPU and RAM utilization of all VMs working on a Hyper-V host and can gather information from a remote host as well. With this, it is much easier for you to manage VM consumption dynamics and oversee the trend. Figure 8. Veeam Task Manager for Hyper-VTo conclude, resource metering in Hyper-V and Veeam Task Manager for Hyper-V both allow you to bring some value to your business, calculate charges for resource utilization and manage virtual resources in a better way. No VM activity will come through them undiscovered. Got advanced scripts for resource metering? Share with the community in the comments, so we all can benefit. See also |