Set-SCHostReserve

Modifies the host reserve settings for a host group.

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

The Set-SCHostReserve cmdlet modifies the host reserve settings for a host group. To modify the host reserve settings for a host group, that host group must not be inheriting its settings from a parent host group.

When you set the host reserve levels, the unit parameters, such as GB or Percentage, dictate the units in which the other levels, such as StartOptimizationLevel and PlacementLevel, are expressed.

The values for VMHostReserveLevel, StartOptimizationLevel and PlacementLevel must be represented in order. For example, the value for StartOptimizationLevel cannot be less than the value for VMHostReserveLevel, and the value for PlacementLevel cannot be less than the value for StartOptimizationLevel.

When the host has less than the specified amount for StartOptimizationLevel available, Dynamic Optimization attempts to rebalance the load.

A host will never be forced by Power Optimization to have less than the specified amount for PlacementLevel available because of another node being powered off.

Examples

Example 1: Modify the CPU host reserve and placement settings for a specified host group

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

The first command gets the host group object named HostGroup01 and stores the object in the $HostGroup variable.

The second command gets the host reserve object for the host group stored in $HostGroup, and then stores the object in the $HostReserve variable.

The last command uses the pipeline operator to pass the host reserve stored in $HostReserve to the Set-SCHostReserve cmdlet, which updates the host reserve and placement settings.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CPU

Specifies a host reserve CPU resource type.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DiskIO

Specifies a host reserve Disk I/O resource type.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DiskSpace

Specifies a host reserve Disk Space resource type.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Enabled

Enables an object when set to $True, or disables an object when set to $False. For example, if you want to upgrade software on a virtual machine template, you can disable the template object in the VMM library to temporarily prevent users from using that object.

Type:Boolean
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-GB

Indicates that the unit for a host reserve resource is expressed in gigabytes (GB).

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-HostReserve

Specifies a host reserve settings object.

Type:HostReserveSettings
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Inherit

Indicates whether settings are inherited from the parent host group.

Type:Boolean
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-IOPS

Indicates that the unit for a host reserve resource is expressed in disk input/output operations per second (IOPS).

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MB

Indicates that the unit for a host reserve resource is expressed in megabytes (MB).

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Mbps

Indicates that the unit for a host reserve resource is expressed in megabits per second (Mbps).

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Memory

Specifies a host reserve Memory resource type.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Network

Specifies a host reserve Network I/O resource type.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Percent

Indicates that the unit for a host reserve resource is expressed in percent (%).

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PlacementLevel

Specifies the host reserve level above which placement is acceptable.

Type:UInt64
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StartOptimizationLevel

Specifies the host reserve level at which dynamic optimization is started.

Type:UInt64
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-VMHostReserveLevel

Specifies the host reserve level at which placement returns an error if starting a virtual machine would require dropping below this level.

Type:UInt64
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

HostReserve

This cmdlet returns a HostReserve object.