Host Resource Protection

Being able to identify a VM that is not behaving properly and consuming more host resources than it should is a challenging task. You can certainly monitor resource utilization and react to a misbehaving VM. However, proactively managing VMs at scale will prove to be a very demanding task.

This is where Host Resource Protection comes in. This feature helps to prevent a VM from using more than its share of system resources, by looking for excessive levels of activity and throttling back this misbehaving VM to lessen the impact. This monitoring and enforcement is switched off by default, and can be enabled by using Windows PowerShell.

Getting ready

Host Resource Protection is configured on the Windows Server 2016 Hyper-V host, and simply requires a VM, running either a Windows or Linux operating system, to monitor.

How to do it…

The following step will show you how to configure Host Resource Protection for a given Windows Server 2016 Hyper-V host:

  • On the Windows Server 2016 Hyper-V host, open an elevated PowerShell command prompt and use the following PowerShell command to enable Host Resource Protection:
    Set-VMProcessor -EnableHostResourceProtection $true
    

How it works…

Host Resource Protection automatically restricts host resource availability to VM that display excessive levels of activity, based on an expected pattern of access. The logic here is that the Hyper-V host will proactively try to detect malicious activity, that is, activity you would not expect of a well-behaving operating system, and automatically throttle back the resources given to that VM, to minimize the overall impact on the host.

See also…

  • The Virtual Machine Compute Resiliency recipes in Chapter 7, Configuring High Availability in Hyper-V.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.22.107