Set-SCDynamicOptimizationConfiguration
为主机组配置动态优化。
语法
Set-SCDynamicOptimizationConfiguration
-Inherit <Boolean>
-DynamicOptimizationConfiguration <HostGroupDOSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCDynamicOptimizationConfiguration
-ManualMode
-DynamicOptimizationConfiguration <HostGroupDOSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCDynamicOptimizationConfiguration
-ManualModeForDisk
-DynamicOptimizationConfiguration <HostGroupDOSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCDynamicOptimizationConfiguration
-AutomaticMode
-DynamicOptimizationConfiguration <HostGroupDOSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCDynamicOptimizationConfiguration
-AutomaticModeForDisk
-DynamicOptimizationConfiguration <HostGroupDOSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCDynamicOptimizationConfiguration
-DynamicOptimizationConfiguration <HostGroupDOSettings>
[-Aggressiveness <Byte>]
[-DiskAggressiveness <Byte>]
[-FrequencyMinutes <UInt32>]
[-EnablePowerOptimization <Boolean>]
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
Set-SCDynamicOptimizationConfiguration cmdlet 为主机组配置计算和存储动态优化。
示例
示例 1:为动态优化配置启用自动模式
PS C:\> $HostGroup = Get-SCVMHostGroup "HostGroup01"
PS C:\> $DOConfig = Get-SCDynamicOptimizationConfiguration -VMHostGroup $HostGroup
PS C:\> Set-SCDynamicOptimizationConfiguration -DynamicOptimizationConfiguration $DOConfig -AutomaticMode
第一个命令获取名为 HostGroup01 的主机组对象,并将对象存储在$HostGroup变量中。
第二个命令获取存储在$HostGroup中的主机组的动态优化配置对象,并将对象存储在$DOConfig变量中。
最后一个命令为存储在$DOConfig中的动态优化配置启用自动模式。
示例 2:为主机组启用电源优化
PS C:\> $HostGroup = Get-SCVMHostGroup "HostGroup01"
PS C:\> $DOConfig = Get-SCDynamicOptimizationConfiguration -VMHostGroup $HostGroup
PS C:\> Set-SCDynamicOptimizationConfiguration -DynamicOptimizationConfiguration $DOConfig -EnablePowerOptimization $True
第一个命令获取名为 HostGroup01 的主机组对象,并将对象存储在$HostGroup变量中。
第二个命令获取存储在$HostGroup中的主机组的动态优化配置对象,并将对象存储在$DOConfig变量中。
最后一个命令为存储在$DOConfig中的动态优化配置启用电源优化。
示例 3:为存储动态优化配置启用自动模式
PS C:\> $HostGroup = Get-SCVMHostGroup "HostGroup01"
PS C:\> $DOConfig = Get-SCDynamicOptimizationConfiguration -VMHostGroup $HostGroup
PS C:\> Set-SCDynamicOptimizationConfiguration -DynamicOptimizationConfiguration $DOConfig -AutomaticModeForDisk
第一个命令获取名为 HostGroup01 的主机组对象,并将对象存储在$HostGroup变量中。
第二个命令获取存储在$HostGroup中的主机组的动态优化配置对象,并将对象存储在$DOConfig变量中。
最后一个命令为存储在$DOConfig中的存储动态优化配置启用自动模式。
参数
-Aggressiveness
指定将虚拟机从一台主机迁移到另一台主机之前所需的改进级别,以便对虚拟机进行负载均衡。
攻击性越高,生成的实时迁移就越大:攻击性越低,生成的实时迁移就越少。 有效值为:1 到 5。 默认值为 3 (中等) 。
Type: | Byte |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AutomaticMode
指示计算动态优化会自动迁移虚拟机以进行负载均衡。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AutomaticModeForDisk
指示存储动态优化会自动迁移虚拟硬盘,以便对存储进行负载均衡。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
提示你在运行 cmdlet 之前进行确认。
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DiskAggressiveness
指定在将虚拟硬盘 (vhd) 从一个共享存储 (CSV 或文件共享) 迁移到另一个共享存储之前所需的改进级别,以便对 VHD 进行负载均衡。
攻击性越高,VHD 迁移越多:攻击性越低,生成的迁移就越少。 有效值为:1 到 5。 默认值为 3 (中等) 。
Type: | Byte |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DynamicOptimizationConfiguration
指定动态优化配置对象。
Type: | HostGroupDOSettings |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-EnablePowerOptimization
当设置为$True时启用电源优化。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FrequencyMinutes
指定设置为自动模式时将运行动态优化的频率(以分钟为单位)。
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Inherit
指示是否从父主机组继承设置。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
指定跟踪作业进度,并将其存储在此参数命名的变量中。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ManualMode
指示动态优化不会自动运行。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ManualModeForDisk
指示存储动态优化不会自动运行。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
指定触发此操作 (PRO 提示) 的性能和资源优化提示的 ID。 此参数允许审核 PRO 提示。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
指示作业异步运行,以便控件立即返回到命令 shell。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
指定VMM 服务器对象。
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
显示在此 cmdlet 运行的情况下将会发生什么。 此 cmdlet 未运行。
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
输出
DynamicOptimizationConfiguration
此 cmdlet 返回 DynamicOptimizationConfiguration 对象。