420 likes | 592 Views
Keeping Hyper-V Healthy. Brien Posey. http://www.backupacademy.com Brien@brienposey.com Twitter: @BckpAcademy. About Me. Freelance technology author and eleven time Microsoft MVP Formerly worked as CIO for a national chain of hospitals and healthcare facilities
E N D
Keeping Hyper-V Healthy Brien Posey http://www.backupacademy.com Brien@brienposey.com Twitter: @BckpAcademy
About Me • Freelance technology author and eleven time Microsoft MVP • Formerly worked as CIO for a national chain of hospitals and healthcare facilities • Served as a network engineer for the DoD at Fort Knox • Worked as a network administrator for some of the country’s largest insurance companies
Keeping Hyper-V Healthy • Hyper-V requires routine monitoring and maintenance to remain healthy. • Two common tasks are: • Resource metering • Patching
Resource Metering • Resource monitoring is used to prevent a host from being overloaded and for future capacity planning, but that’s just the beginning. • Applications tend to span multiple VMs • If you want to know about application resource consumption, you must examine the related VMs collectively. • The same principle also applies to departmental chargebacks.
Hyper-V Resource Metering • 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
Resource Metering • Live (or offline) migrations do not impact resource metering. • Windows Server 2012 R2 adds network metering port ACLs. This allows differentiation between internal network traffic and external network traffic for billing purposes. • Resource metering must be enabled before it can be used.
Per Host Metering • This command enables metering to VMs on a host. • The command does not impact new VMs or VMs that are Live Migrated to the host.
The Collection Interval • Data is not collected in real time. • The default collection interval is one hour • The collection interval can only be set at the host level. • You should not collect data more frequently then once per minute.
Building a CSV File Get-VM | Measure-VM | Export-CSV C:\Data\Performance_Data.csv
Building an HTML Report • Get-VM | Measure-VM | Select-Object VMName, AvgRAM, MaxRAM, MinRAM | ConvertTo-HTML | Out-File C:\Data\Performance_Data.htm • Invoke-Expression C:\Data\Performance_Data.htm
Make it a Bit More Exciting $a = "<style>" $a = $a + "BODY{background-color:peachpuff;}" $a = $a + "TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}" $a = $a + "TH{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:thistle}" $a = $a + "TD{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:PaleGoldenrod}" $a = $a + "</style>" Get-VM | Measure-VM | Select-Object VMName, AvgRAM, MaxRAM, MinRAM | ConvertTo-HTML -head $a &45;body "<H2>Performance Data</H2>" | Out-File C:\Data\Performance_Data.htm
Before and After Source: http://technet.microsoft.com/en-us/library/ff730936.aspx
Cluster Aware Updating • Prior to Windows Server 2012 patching a cluster was a very tedious process. • The process was worse in extremely large clusters • Windows Server 2012 automates this process.
Setting a Schedule • Avoid running during peak business hours.
Enjoy and share this material • Feel free to promote this material • Recommend your peers to pass certification • Blog, Tweet and share this material and your experience on Facebook • You’re an Expert? We will be happy to have you as Backup Academy contributor. Apply here Web: http://www.backupacademy.com E-mail: feedback@backupacademy.com Twitter: BckpAcademy Facebook: backup.academy