powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Set-VMResourceConfiguration



NAME
Set-VMResourceConfiguration

SYNOPSIS
Configures resource allocation between the virtual machines.

SYNTAX
Set-VMResourceConfiguration [-Configuration] [-HtCoreSharing ] [-CpuAffi
nity ] [-CpuReservationMhz ] [-CpuLimitMhz ] [-CpuSharesLevel ] [-NumCpuSha
res ] [-MemReservationMB ] [-MemLimitMB ] [-MemSharesLevel ] [-NumMemShares 2>] [-Disk ] [-NumDiskShares ] [-DiskSharesLevel ] [-DiskLimitIOPerSecond ]
[-WhatIf] [-Confirm] []


DESCRIPTION
Configures resource allocation between the virtual machines. To retain the current value of a setting, omit the cor
responding parameter. To disable a setting (only applicable to the nullable limit settings), pass $null.


PARAMETERS
-Configuration
Specify the configuration object you want to modify.

Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-HtCoreSharing
Indicate 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 schedu
led 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 setti
ng is the same as the None setting.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-CpuAffinity
Specify how virtual machine CPUs are distributed across the host physical cores (and hyperthreads if hyperthrea
ding is enabled). This option is not allowed when the virtual machine resides on a DRS cluster, and its values
are cleared when a virtual machine is migrated to a new host, because the only value of the option is in tuning
the performance of a precise set of virtual machines on the same host. If you specify affinities, you must pr
ovide at least as many processor affinities as the number of virtual CPUs in the virtual machine. The valid val
ues are NoAffinity, Cpu1, ..., Cpu63.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-CpuReservationMhz
Specify the number of CPU MHz that are guaranteed available.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-CpuLimitMhz
Specify the limit on CPU usage in MHz. Utilization will not exceed this limit even if there are available resou
rces.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-CpuSharesLevel
Specify the CPU allocation level. Used in relative allocation between virtual machines. The valid values are Cu
stom, High, Low, and Normal.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-NumCpuShares
Specify the CPU allocation level for this pool. Used in relative allocation between resource consumers. This pa
rameter is ignored unless CpuSharesLevel is set to Custom.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-MemReservationMB
Specify the number of memory MB that are guaranteed available.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-MemLimitMB
Specify the limit on memory usage in MB. Utilization will not exceed this limit even if there are available res
ources.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-MemSharesLevel
Specify 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
Accept pipeline input? false
Accept wildcard characters? false

-NumMemShares
Specify the number of memory shares allocated. Used to determine resource allocation in case of resource conten
tion.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Disk
Specify the virtual hard disk you want to configure.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-NumDiskShares
Specify the number of shares allocated. Used to determine resource allocation in case of resource contention.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-DiskSharesLevel
Specify the allocation level. The level is a simplified view of shares. Levels map to a pre-determined set of n
umeric values for shares. If the shares value does not map to a predefined size, then the level is set as custo
m.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

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

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf
Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modi
fied.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm
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


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
VMResourceConfiguration


NOTES




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

C:\PS>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: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Set-VMResourceConfiguration.html
Get-VMResourceConfiguration