Set up dynamic and power optimization in VMM
This version of Virtual Machine Manager (VMM) has reached the end of support, we recommend you to upgrade to VMM 2019.
Read this article to learn about enabling dynamic optimization (DO) and power optimization for virtual machines (VMs) in the System Center - Virtual Machine Manager (VMM). The article includes features overview, instructions for setting up BMC for power optimization, and describes how to enable and run these features.
VMM 2019 and later supports dynamic optimization for Compute and Storage. Versions prior to VMM 2019 support DO for compute only, use the following procedures as applicable for the version of VMM you are using.
Dynamic optimization: Using dynamic optimization, VMM performs live migration of VMs and VHDs within a host cluster. The migration is based on the settings you specify, to improve load balancing among hosts and cluster shared storage (Cluster shared volumes (CSV), file shares), and to correct the placement issues for VMs.
Compute Dynamic optimization (Optimization of hosts) can be performed on hosts in a cluster to optimize host performance by migrating VMs across hosts. Host performance thresholds you can set are: CPU and Memory.
Storage Dynamic Optimization (Optimization of disk space, applicable for VMM 2019 and later) can be performed on cluster shared storage (CSV, file shares) to optimize storage space availability by migrating Virtual Hard Disks (VHD) across shared storage. You can set free storage space threshold on cluster shared storage.
Power optimization: Power optimization is a feature of dynamic optimization that saves energy by turning off hosts that aren't needed to meet resource requirements within a cluster, and turns them back on when they're needed.
VMM supports compute dynamic optimization (both compute and storage in VMM 2019 and later) and power optimization on Hyper-V host clusters. Compute dynamic optimization and power optimization is also supported on VMware host clusters in the VMM fabric that support live migration.
Before you start
Note the following information before you start using the DO.
- Dynamic optimization and power optimization can be configured on host clusters that support live migration.
- Dynamic optimization can be configured on a host group, to migrate virtual machines and virtual hard disks (VHDs) within host clusters with a specified frequency and aggressiveness. VM aggressiveness determines the amount of load imbalance that is required to initiate a migration during dynamic optimization.
- Disk space aggressiveness determines the amount of free storage space below disk space threshold that is required to migrate VHDs to other cluster shared storage during dynamic optimization.
- By default, virtual machines are migrated every 10 minutes with medium aggressiveness, if automatic migration is enabled. When configuring frequency and aggressiveness for dynamic optimization, an administrator should factor in the resource cost of additional migrations against the advantages of balancing load among hosts/shared storage in a host cluster. By default, a host group inherits Dynamic Optimization settings from its parent host group.
- If you set up dynamic optimization on a host group without a cluster it will have no effect.
- Dynamic optimization can be set up for clusters with two or more nodes. Storage dynamic optimization will need two or more shared storage files/volumes to be present in the cluster. If a host group contains stand-alone hosts or host clusters that do not support live migration, dynamic optimization isn't performed on those hosts. Any hosts that are in maintenance mode also are excluded from dynamic optimization. In addition, VMM only migrates highly available virtual machines that use shared storage. If a host cluster contains virtual machines that are not highly available, those virtual machines are not migrated during Dynamic Optimization.
- On-demand dynamic optimization is also available for individual host clusters by using the Optimize Hosts/ Optimize Disk space action in the VMs and Services workspace. It can be performed without configuring dynamic optimization on host groups. After dynamic optimization is requested for a host cluster, VMM lists the virtual machines/VHDs that will be migrated, for the administrator's approval. Optimize Hosts performs VM load balancing across hosts in a cluster, while Optimize disk space migrates VHDs across Shared storage in a cluster.
Node fairness is a new feature in Windows Server 2016. It identifies cluster nodes with light loads, and distributes VMs to those node to balance load. This is similar to VMM's dynamic optimization. To avoid potential performance issues, dynamic optimization and node fairness shouldn't work together. To ensure this doesn't happen VMM disables node fairness in all clusters in a host group for which dynamic optimization is set to automatic. If you enable node fairness outside the VMM console, VMM will turn it off the next time that dynamic optimization refreshes. If you do want to use node fairness, disable dynamic optimization, and then manually enable node fairness.
- For power optimization, the computers must have a baseboard management controller (BMC) that enables out-of-band management.
- Power optimization ensures that a cluster maintains a quorum if an active node fails. For clusters created outside VMM and added to VMM, Power Optimization requires more than four nodes. For each additional one or two nodes in a cluster, one node can be powered down. For instance:
- One node can be powered down for a cluster of five or six nodes.
- Two nodes can be powered down for a cluster of seven or eight nodes.
- Three nodes can be powered down for a cluster of nine or ten nodes.
- When VMM creates a cluster, it creates a quorum disk and uses that disk as part of the quorum model. For clusters created by VMM, Power Optimization can be set up for clusters of more than three nodes. This means that the number of nodes that can be powered down is as follows:
- One node can be powered down for a cluster of four or five nodes.
- Two nodes can be powered down for a cluster of six or seven nodes.
- Three nodes can be powered down for a cluster of eight or nine nodes.
For hosts with BMC that supports IMPI 1.5/2.0, DCMI 1.0 or SMASH 1.0 over WS-Management you can figure BMC settings as follows:
- Create a Run As account with permissions to access the BMC on a host.
- Click Fabric > Servers > All Hosts > host > Properties > Hardware > Advanced > BMC Setting.
- To enable VMM management, select This physical machine is configured for OOB management.
- In This computer supports the specified OOB power management configuration provider, click the supported management protocol. Type in the IP address of the BMC, and accept the default port offered by VMM. Select the Run As account and click OK.
Enable dynamic and power optimization for a host group
Click Fabric > Servers > All Hosts, and select the host group that you want to configure.
With the host group selected, click Folder > Properties group > Properties.
In the host group properties, click Dynamic Optimization.
In Specify dynamic optimization settings, clear the Use Dynamic Optimization settings from the parent host group check box.
In Aggressiveness, select High, Medium, or Low.
VM aggressiveness determines the amount of load imbalance that is required to initiate a migration during dynamic optimization.
Disk space aggressiveness determines the amount of free storage space below disk space threshold that is required to migrate VHDs to other cluster shared storage during dynamic optimization.
When you configure frequency and aggressiveness for dynamic optimization, you should try to balance the resource cost of additional migrations against the advantages of balancing load among hosts in a host cluster. Initially, you might accept the default value of Medium. After you observe the effects of dynamic optimization in your environment, you can increase the aggressiveness.
To help conserve energy by having VMM turn off hosts when they are not needed and turn them on again when they are needed, configure power optimization for the host group. Power optimization is only available when virtual machines are being migrated automatically to balance load.
To periodically run dynamic optimization on qualifying host clusters in the host group, enter the following settings:
- Select the Automatically migrate virtual machines to balance load check box to balance free storage space across shared storage.
- In Frequency, specify how often to run dynamic Optimization. You can enter any value between 10 minutes and 1440 minutes (24 hours).
Set thresholds for each of the compute and storage ( applicable for VMM 2019) resources listed. To change the units of the resources go to Host group> Properties > Host Reserves and choose the unit from the drop-down menu.
To turn on power optimization on the host group, select the Enable power optimization checkbox. Click OK again to save your changes.
If there is a mismatch of disk space warning levels between host groups having the same file share, it can result in multiple migrations to and from that file share and may impact storage DO performance. We recommended you not to do a file share across different host groups where storage dynamic optimization is enabled.
Configure power optimization settings
- In the Fabric navigate to the host group and open Properties.
- Click Dynamic Optimization > Specify dynamic optimization settings > Settings.
- In Customize Power Optimization Schedule, change the settings for any of these resources: CPU, memory, disk I/O , or network I/O.
- Under Schedule, select the hours when you want power optimization to be performed. Click a box to turn power optimization on or off for that hour. VMM applies the schedule according to the host time zone.
Run dynamic optimization on-demand in a host cluster
You can run dynamic optimization on demand on a host cluster. To do this dynamic optimization doesn't need to be configured on the parent host group.
Open Fabric > Servers > Host Groups, and navigate the host cluster.
To perform compute resource load balancing, click Optimize hosts. To perform storage load balancing across cluster shared storage, click Optimize disks.
To Optimize hosts: VMM performs a dynamic optimization review to determine whether VHDs can be migrated to improve load balancing in the host cluster. If migration of VMs can improve load balancing, VMM displays a list of VMs that are recommended for migration, with the current and target hosts indicated. The list excludes any hosts that are in maintenance mode in VMM and any virtual machines that are not highly available.
To Optimize Disk Space: VMM performs a dynamic optimization review to determine whether VHDs can be migrated to meet the free storage space threshold (disk space) while considering aggressiveness set in the Dynamic Optimization page. Dynamic Optimization will only be triggered when any cluster shared storage violates the disk space threshold set. If migration of VHDs can help free the storage space threshold in shared storage in the cluster, VMM displays a list of VHDs that are recommended for migration, with the current and target storage space indicated. VHDs will only migrate to another shared storage with the same storage classification.
If VHDs are migrated between one storage type to another (Example: from a CSV to NAS file share), the storage migration will be slow. If the storage optimization does not return a list of VHDs to migrate even when the threshold and aggressiveness criteria are met: - Check the HostVolumeID using Get-SCStorageVolume Cmdlet. If the HostVolumeID returns Null for the volume, refresh the VM and perform Storage Dynamic Optimization again. - Check the DiskSpacePlacementLevel of the host group using the Get-SCHostResever cmdlet. Set the DiskSpacePlacementLevel value equal to the value of Disk Space set in Host Reserve settings in the Dynamic Optimization wizard.
Power on/off a computer in VMM
- Click Fabric > Servers > All Hosts > host name.
- On the Host tab, in the Host group click Power On or Power Off. You can view information about power on and off events in the BMC logs (click on Hardware > Advanced > BMC Logs).
Learn about provisioning VMs.