vSphere PowerCLI Reference

New-VApp

Synopsis

This cmdlet creates a new vApp.

Syntax

New-VApp -Location <VIContainer> [-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[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]
New-VApp -Location <VIContainer> [[-Name] <String>] -VApp <VApp> [-VMHost <VMHost>] [-Datastore <Datastore>] [-DiskStorageFormat <VirtualDiskStorageFormat>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]
New-VApp -Location <VIContainer> [[-Name] <String>] [-Datastore <Datastore>] -ContentLibraryItem <ContentLibraryItem> [-DiskStorageFormat <VirtualDiskStorageFormat>] [-Server <VIServer[]>] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

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

Detailed Description

This cmdlet creates a new vApp.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
NameStringSpecifies a name for the new vApp.truefalse
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
ContentLibraryItemContentLibraryItemSpecifies the content library template to deploy the vApp from.truetrue (ByValue)
CpuExpandableReservationBooleanIndicates that the CPU reservation can grow beyond the specified value if there are available resources.falsefalse
CpuLimitMhzInt64Specifies a CPU usage limit in MHz. Utilization will not exceed this limit even if there are available resources.falsefalse
CpuReservationMhzInt64Specifies the CPU size in MHz that is guaranteed to be available.falsefalse
CpuSharesLevelSharesLevelSpecifies the CPU allocation level for this vApp. This property is used in relative allocation between resource consumers. The valid values are Custom, High, Low, and Normal.falsefalse
DatastoreDatastoreSpecifies the datastore where you want to store the copied vApp. If you do not specify a datastore, the cmdlet takes the first datastore of the host or cluster.falsefalse
DiskStorageFormatVirtualDiskStorageFormatSpecifies the storage format of the disks of the vApp.falsefalse
LocationVIContainerSpecifies a VApp, ResourcePool, VMHost, or Cluster object where you want to place the new vApp.truetrue (ByValue)
MemExpandableReservationBooleanIf the value is $true, the memory reservation can grow beyond the specified value if there are available resources.falsefalse
MemLimitGBDecimalSpecifies 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.
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.
falsefalse
MemReservationGBDecimalSpecifies the guaranteed available memory in gigabytes (GB).falsefalse
MemReservationMBInt64This parameter is obsolete. Use MemReservationGB instead.
Specifies the guaranteed available memory in megabytes (MB).
falsefalse
MemSharesLevelSharesLevelSpecifies the memory allocation level for this vApp. This property is used in relative allocation between resource consumers. The valid values are Custom, High, Low, and Normal.falsefalse
NumCpuSharesInt32Specifies the CPU allocation level for this vApp. This property is used in relative allocation between resource consumers. This parameter is ignored unless the CpuSharesLevel parameter is set to Custom.falsefalse
NumMemSharesInt32Specifies the memory allocation level for this vApp. This property is used in relative allocation between resource consumers. This parameter is ignored unless the MemSharesLevel parameter is set to Custom.falsefalse
RunAsyncSwitchParameterIndicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the vSphere PowerCLI console.falsefalse
ServerVIServer[]Specifies the Center 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
VAppVAppSpecifies a vApp you want to copy.truetrue (ByValue)
VMHostVMHostSpecifies the host where you want to run the copied vApp.falsefalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

The newly created VApp object

Notes

Examples

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

New-VApp -Name MyVApp1 -CpuLimitMhz 4000 -CpuReservationMhz 1000 -Location MyVMHost1

Creates a new vApp on the MyVMHost1 host.


Copyright © VMware, Inc. All rights reserved.