Dela via


Set-SCHostReserve

Ändrar värdreservinställningarna för en värdgrupp.

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

Cmdleten Set-SCHostReserve ändrar värdreservinställningarna för en värdgrupp. Om du vill ändra inställningarna för värdreserven för en värdgrupp får värdgruppen inte ärva inställningarna från en överordnad värdgrupp.

När du anger värdreservnivåerna avgör enhetsparametrarna, till exempel GB eller Procent, de enheter där de andra nivåerna, till exempel StartOptimizationLevel och PlacementLevel, uttrycks.

Värdena för VMHostReserveLevel, StartOptimizationLevel och PlacementLevel måste representeras i ordning. Värdet för StartOptimizationLevel kan till exempel inte vara mindre än värdet för VMHostReserveLevel, och värdet för PlacementLevel får inte vara mindre än värdet för StartOptimizationLevel.

När värden har mindre än det angivna beloppet för StartOptimizationLevel tillgängligt försöker dynamisk optimering balansera om belastningen.

En värd tvingas aldrig av energioptimering att ha mindre än det angivna beloppet för PlacementLevel tillgängligt på grund av att en annan nod stängs av.

Exempel

Exempel 1: Ändra inställningarna för CPU-värdreserven och placering för en angiven värdgrupp

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

Det första kommandot hämtar värdgruppsobjektet med namnet HostGroup01 och lagrar objektet i variabeln $HostGroup.

Det andra kommandot hämtar värdreservobjektet för värdgruppen som lagras i $HostGroup och lagrar sedan objektet i variabeln $HostReserve.

Det sista kommandot använder pipelineoperatorn för att skicka värdreserven som lagras i $HostReserve till cmdleten Set-SCHostReserve , som uppdaterar värdreserven och placeringsinställningarna.

Parametrar

-Confirm

Uppmanar dig att bekräfta innan du kör cmdleten.

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

-CPU

Anger en cpu-resurstyp för värdreserven.

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

-DiskIO

Anger en disk-I/O-resurstyp för värdreserven.

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

-DiskSpace

Anger en resurstyp för värdreservens diskutrymme.

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

-Enabled

Aktiverar ett objekt när det är inställt på $True eller inaktiverar ett objekt när det är inställt på $False. Om du till exempel vill uppgradera programvara på en mall för virtuella datorer kan du inaktivera mallobjektet i VMM-biblioteket för att tillfälligt förhindra användare från att använda objektet.

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

-GB

Anger att enheten för en värdreservresurs uttrycks i gigabyte (GB).

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

-HostReserve

Anger ett objekt för värdreservinställningar.

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

-Inherit

Anger om inställningarna ärvs från den överordnade värdgruppen.

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

-IOPS

Anger att enheten för en värdreservresurs uttrycks i diskindata-/utdataåtgärder per sekund (IOPS).

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

-JobVariable

Anger att jobbstatus spåras och lagras i variabeln som heter av den här parametern.

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

-MB

Anger att enheten för en värdreservresurs uttrycks i megabyte (MB).

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

-Mbps

Anger att enheten för en värdreservresurs uttrycks i megabitar per sekund (Mbit/s).

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

-Memory

Anger en resurstyp för värdreservens minnesresurs.

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

-Network

Anger en värdreserv nätverks-I/O-resurstyp.

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

-Percent

Anger att enheten för en värdreservresurs uttrycks i procent (%).

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

-PlacementLevel

Anger värdreservnivån över vilken placering som är acceptabel.

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

-PROTipID

Anger ID för tipset prestanda- och resursoptimering (PRO-tips) som utlöste den här åtgärden. Med den här parametern kan du granska PRO-tips.

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

-RunAsynchronously

Anger att jobbet körs asynkront så att kontrollen återgår till kommandogränssnittet omedelbart.

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

-StartOptimizationLevel

Anger den värdreservnivå där dynamisk optimering startas.

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

-VMHostReserveLevel

Anger den värdreservnivå där placeringen returnerar ett fel om det skulle krävas att en virtuell dator startas under den här nivån.

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

-VMMServer

Anger ett VMM-serverobjekt.

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

-WhatIf

Visar vad som skulle hända om cmdleten kördes. Cmdleten körs inte.

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

Utdata

HostReserve

Den här cmdleten returnerar ett HostReserve-objekt.