Set-SCHostReserve
修改主機群組的主機保留設定。
Syntax
Set-SCHostReserve
-Enabled <Boolean>
[-DiskIO]
-HostReserve <HostReserveSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
-Enabled <Boolean>
[-Memory]
-HostReserve <HostReserveSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
-Enabled <Boolean>
[-DiskSpace]
-HostReserve <HostReserveSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
-Enabled <Boolean>
[-Network]
-HostReserve <HostReserveSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
-Enabled <Boolean>
[-CPU]
-HostReserve <HostReserveSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-CPU]
-HostReserve <HostReserveSettings>
-StartOptimizationLevel <UInt64>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-CPU]
-HostReserve <HostReserveSettings>
-PlacementLevel <UInt64>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-CPU]
-HostReserve <HostReserveSettings>
-VMHostReserveLevel <UInt64>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-DiskIO]
-HostReserve <HostReserveSettings>
-VMHostReserveLevel <UInt64>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-DiskIO]
-HostReserve <HostReserveSettings>
-PlacementLevel <UInt64>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-DiskIO]
[-Percent]
-HostReserve <HostReserveSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-DiskIO]
-HostReserve <HostReserveSettings>
-StartOptimizationLevel <UInt64>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-DiskIO]
[-IOPS]
-HostReserve <HostReserveSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-DiskSpace]
[-GB]
-HostReserve <HostReserveSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-DiskSpace]
[-MB]
-HostReserve <HostReserveSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-DiskSpace]
-HostReserve <HostReserveSettings>
-VMHostReserveLevel <UInt64>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-DiskSpace]
[-Percent]
-HostReserve <HostReserveSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-DiskSpace]
-HostReserve <HostReserveSettings>
-PlacementLevel <UInt64>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-DiskSpace]
-HostReserve <HostReserveSettings>
-StartOptimizationLevel <uint64>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-Memory]
[-GB]
-HostReserve <HostReserveSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-Memory]
-HostReserve <HostReserveSettings>
-VMHostReserveLevel <UInt64>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-Memory]
-HostReserve <HostReserveSettings>
-PlacementLevel <UInt64>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-Memory]
[-Percent]
-HostReserve <HostReserveSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-Memory]
[-MB]
-HostReserve <HostReserveSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-Memory]
-HostReserve <HostReserveSettings>
-StartOptimizationLevel <UInt64>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-Network]
-HostReserve <HostReserveSettings>
-StartOptimizationLevel <UInt64>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-Network]
[-Mbps]
-HostReserve <HostReserveSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-Network]
-HostReserve <HostReserveSettings>
-VMHostReserveLevel <UInt64>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-Network]
[-Percent]
-HostReserve <HostReserveSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
[-Network]
-HostReserve <HostReserveSettings>
-PlacementLevel <UInt64>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-SCHostReserve
-Inherit <Boolean>
-HostReserve <HostReserveSettings>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Set-SCHostReserve Cmdlet 會修改主機群組的主機保留設定。 若要修改主機群組的主機保留設定,該主機群組不得從父主機群組繼承其設定。
當您設定主機保留層級時,單位參數,例如 GB 或 Percentage,會指定其他層級的單位,例如 StartOptimizationLevel 和 PlacementLevel。
VMHostReserveLevel、StartOptimizationLevel和PlacementLevel的值必須依序表示。 例如, StartOptimizationLevel 的值不能小於 VMHostReserveLevel的值, 而 PlacementLevel 的值不能小於 StartOptimizationLevel的值。
當主機的 StartOptimizationLevel 數量小於指定的可用數量時,動態優化會嘗試重新平衡負載。
由於另一個節點已關閉電源,因此 Power Optimization 永遠不會強制主機小於 PlacementLevel 可用的指定數量。
範例
範例 1:修改指定主機群組的 CPU 主機保留和放置設定
PS C:\> $HostGroup = Get-SCVMHostGroup "HostGroup01"
PS C:\> $HostReserve = Get-SCHostReserve -VMHostGroup $HostGroup
PS C:\> $HostReserve | Set-SCHostReserve -CPU -PlacementLevel 75 -StartOptimizationLevel 80 -VMHostReserveLevel 90
第一個命令會取得名為 HostGroup01 的主機群組物件,並將物件儲存在$HostGroup變數中。
第二個命令會取得儲存在 $HostGroup 之主機群組的主機保留物件,然後將物件儲存在$HostReserve變數中。
最後一個命令會使用管線運算子,將儲存在 $HostReserve中的主機保留傳遞至 Set-SCHostReserve Cmdlet,以更新主機保留和放置設定。
參數
-Confirm
在執行 Cmdlet 前提示您確認。
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CPU
指定主機保留 CPU 資源類型。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DiskIO
指定主機保留磁片 I/O 資源類型。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DiskSpace
指定主機保留磁碟空間資源類型。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Enabled
當設定為 $True 時啟用 物件,或在設定為 $False時停用 物件。 例如,如果您想升級虛擬機器範本的軟體時,您可以停用 VMM 程式庫的範本物件,暫時禁止使用者使用該物件。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GB
表示主機保留資源的單位是以 GB (GB) 表示。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HostReserve
指定主機保留設定物件。
Type: | HostReserveSettings |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Inherit
指出設定是否繼承自父主機群組。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IOPS
表示主機保留資源的單位是以每秒磁片輸入/輸出作業表示, (IOPS) 。
Type: | SwitchParameter |
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 |
-MB
表示主機保留資源的單位是以 MB (MB) 表示。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Mbps
表示主機保留資源的單位是以 mbps) (mbps 每秒的 MB 位表示。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Memory
指定主機保留記憶體資源類型。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Network
指定主機保留網路 I/O 資源類型。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Percent
表示主機保留資源的單位以百分比表示 (%) 。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PlacementLevel
指定可接受放置的主機保留層級。
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PROTipID
指定觸發此動作 (PRO 提示) 效能和資源優化提示的識別碼。 此參數可讓您稽核 PRO 秘訣。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
表示作業會以非同步方式執行,讓控制項立即返回命令殼層。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StartOptimizationLevel
指定動態優化啟動所在的主機保留層級。
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMHostReserveLevel
指定當啟動虛擬機器需要低於此層級時,放置會傳回錯誤的主機保留層級。
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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 |
輸出
HostReserve
此 Cmdlet 會傳回 HostReserve 物件。