vSphere PowerCLI Reference

Set-VApp

Synopsis

Configures a vApp.

Syntax

Set-VApp -VApp <VApp[]> [-Name <String>] [-CpuExpandableReservation [<Boolean>]] [-CpuLimitMhz <Int64>] [-CpuReservationMhz <Int64>] [-CpuSharesLevel <SharesLevel>] [-MemExpandableReservation [<Boolean>]] [-MemLimitMB <Int64>] [-MemLimitGB <Decimal>] [-MemReservationMB <Int64>] [-MemReservationGB <Decimal>] [-MemSharesLevel <SharesLevel>] [-NumCpuShares <Int32>] [-NumMemShares <Int32>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Export-VApp
Get-VApp
Import-VApp
New-VApp
Remove-VApp
Start-VApp
Stop-VApp
Move-VApp

Detailed Description

Configures a vApp.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ConfirmSwitchParameterIf 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.falsefalse$true
CpuExpandableReservationBooleanIndicate that the CPU reservation can grow beyond the specified value if there are available resources.falsefalse
CpuLimitMhzInt64Specify a CPU usage limit in MHz. If this parameter is set, utilization will not exceed this limit even if there are available resources.falsefalse
CpuReservationMhzInt64Specify the guaranteed available CPU in MHz.falsefalse
CpuSharesLevelSharesLevelSpecify the CPU allocation level for this vApp. This property is used in relative allocation between resource consumers. The valid enumeration values are Custom, High, Low, and Normal.falsefalse
MemExpandableReservationBooleanIndicate that the memory reservation can grow beyond the specified value if there are available resources.falsefalse
MemLimitGBDecimalSpecify 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.falsefalse
MemLimitMBInt64This parameter is obsolete. Use MemLimitGB instead.
Specify 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.
falsefalse
MemReservationGBDecimalSpecify the guaranteed available memory in gigabytes (GB).falsefalse
MemReservationMBInt64This parameter is obsolete. Use MemReservationGB instead.
Specify the guaranteed available memory in megabytes (MB).
falsefalse
MemSharesLevelSharesLevelSpecify the memory allocation level for the vApp. This property is used in relative allocation between resource consumers. The valid enumeration values are Custom, High, Low, and Normal.falsefalse
NameStringModify the name of the vApp.falsefalse
NumCpuSharesInt32Specify the CPU allocation level for the vApp. This property is used in relative allocation between resource consumers. This parameter is ignored unless CpuSharesLevel is set to Custom.falsefalse
NumMemSharesInt32Specify the memory allocation level for the resource pool. This property is used in relative allocation between resource consumers. This parameter is ignored unless MemSharesLevel is set to Custom.falsefalse
ServerVIServer[]Specify the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse
VAppVApp[]Specify the vApp that you want to configure.truetrue (ByValue)
WhatIfSwitchParameterIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

VApp[]

Notes

Examples

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

Get-VApp -Name MyTestVApp1 | Set-VApp -CpuSharesLevel Low -MemSharesLevel Normal

Modifies the CpuSharesLevel and MemSharesLevel properties of the MyTestVApp1 virtual appliance.

-------------- Example 2 --------------

$myvApp = Get-VApp -Location MyDatacenter1
Set-VApp -VApp $myvApp -CpuExpandableReservation:$true -CpuLimitMhz 4000 -MemExpandableReservation:$true -MemLimitGB 2

Modifies the properties of the vApps available on the MyDatacenter1 datacenter.


Copyright © 1998 - 2012 VMware, Inc. All rights reserved.