< Back

Set-VMResourceConfiguration

Sun Jan 19, 2020 7:12 pm

NAME Set-VMResourceConfiguration



SYNOPSIS

This cmdlet configures resource allocation between the virtual machines.





SYNTAX

Set-VMResourceConfiguration [-Configuration] <VMResourceConfiguration[]> [-CpuAffinity <CpuAffinity>]

[-CpuAffinityList <Int32[]>] [-CpuLimitMhz <Int64>] [-CpuReservationMhz <Int64>] [-CpuSharesLevel <SharesLevel>]

[-Disk <HardDisk[]>] [-DiskLimitIOPerSecond <Int64>] [-DiskSharesLevel <SharesLevel>] [-HtCoreSharing

<HTCoreSharing>] [-MemLimitGB <Decimal>] [-MemLimitMB <Int64>] [-MemReservationGB <Decimal>] [-MemReservationMB

<Int64>] [-MemSharesLevel <SharesLevel>] [-NumCpuShares <Int32>] [-NumDiskShares <Int32>] [-NumMemShares <Int32>]

[-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

This cmdlet configures resource allocation between the virtual machines. To retain the current value of a setting,

omit the corresponding parameter. To disable a setting (only applicable to the nullable limit settings), pass

$null.





PARAMETERS

-Configuration <VMResourceConfiguration[]>

Specifies the configuration object you want to modify.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-CpuAffinity <CpuAffinity>

The use of this parameter is deprecated. Use CpuAffinityList instead.



Specifies the distribution of virtual machine CPUs across the physical cores or hyperthreads of the host. You

must pass exactly as many arguments as the number of CPUs of the virtual machine. Each argument specifies the

physical core or hyperthread that the virtual machine will use. Valid arguments are NoAffinity, Cpu1, ...,

Cpu63.



When the virtual machine resides in a DRS cluster, you cannot use CpuAffinity.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-CpuAffinityList <Int32[]>

Specifies the distribution of virtual machine CPUs across the physical cores or hyperthreads of the host. You

must pass exactly as many arguments as the number of CPUs of the virtual machine. Each argument specifies the

physical core or hyperthread that the virtual machine will use. Valid arguments are positive integers. To

clear formerly specified arguments, pass an empty array.



When the virtual machine resides in a DRS cluster, you cannot use CpuAffinityList.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-CpuLimitMhz <Int64>

Specifies the limit on CPU usage in MHz. Utilization will not exceed this limit even if there are available

resources.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-CpuReservationMhz <Int64>

Specifies the number of CPU MHz that are guaranteed to be available.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-CpuSharesLevel <SharesLevel>

Specifies the CPU allocation level. Used in relative allocation between virtual machines. The valid values are

Custom, High, Low, and Normal.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Disk <HardDisk[]>

Specifies the virtual hard disk you want to configure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DiskLimitIOPerSecond <Int64>

Specifies the disk limit IO per second. The valid values are in the range between 16 and 2147483647. -1 means

unlimited.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DiskSharesLevel <SharesLevel>

Specifies the allocation level. The level is a simplified view of shares. Levels map to a pre-determined set

of numeric values for shares. If the shares value does not map to a predefined size, then the level is set as

custom.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-HtCoreSharing <HTCoreSharing>

Specifies whether a virtual machine is scheduled to share a physical processor core (assuming hyperthreading

is enabled on the host at all). The following values are valid:



Any - (default) the virtual CPUs of this virtual machine can freely share cores with other virtual CPUs of

this or other virtual machines.



None - the virtual CPUs of this virtual machine have exclusive use of a processor core whenever they are

scheduled to it. The other hyperthread of the core is "halted" while this virtual machine is using the core.



Internal - on a virtual machine with exactly two virtual processors, the two virtual processors are allowed to

share one physical core (at the discretion of the ESX scheduler), but this virtual machine never shares a core

with any other virtual machine. If this virtual machine has any other number of processors than two, this

setting is the same as the None setting.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-MemLimitGB <Decimal>

Specifies a memory usage limit in gigabytes (GB). If this parameter is set, utilization will not exceed the

specified limit even if there are available resources.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-MemLimitMB <Int64>

This parameter is obsolete. Use MemLimitGB instead. Specifies a memory usage limit in megabytes (MB). If this

parameter is set, utilization will not exceed the specified limit even if there are available resources.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-MemReservationGB <Decimal>

Specifies the guaranteed available memory in gigabytes (GB).



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-MemReservationMB <Int64>

This parameter is obsolete. Use MemReservationGB instead. Specifies the guaranteed available memory in

megabytes (MB).



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-MemSharesLevel <SharesLevel>

Specifies the memory allocation level for this pool. Used in relative allocation between resource consumers.

The valid values are Custom, High, Low, and Normal.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-NumCpuShares <Int32>

Specifies the CPU allocation level for this pool. Used in relative allocation between resource consumers. This

parameter is ignored unless CpuSharesLevel is set to Custom.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-NumDiskShares <Int32>

Specifies the number of shares allocated. Used to determine resource allocation in case of resource contention.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-NumMemShares <Int32>

Specifies the number of memory shares allocated. Used to determine resource allocation in case of resource

contention.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false,

the cmdlet runs without asking for user confirmation.



Required? false

Position? named

Default value $true

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are

modified.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Zero or more modified VMResourceConfiguration objects







NOTES









-------------------------- Example 1 --------------------------



Set-VMResourceConfiguration -Configuration $conf -CpuAffinity ([CpuAffinity]::Cpu1 -bor [CpuAffinity]::Cpu2)



Specifies two affinities for the virtual machine resource configuration in the $conf variable. Bit Or is used.



RELATED LINKS

Online Version: https://code.vmware.com/doc/preview?id= ... ation.html

Get-VMResourceConfiguration