New-VApp Command | Vmware PowerCLI Reference

New-VApp

This cmdlet creates a new vApp.

Syntax

New-VApp
-Location < VIContainer >
-VApp < VApp >
[-Datastore < Datastore > ]
[-DiskStorageFormat < VirtualDiskStorageFormat > ]
[-InventoryLocation < FolderContainer > ]
[-Name < String > ]
[-RunAsync ]
[-Server < VIServer[] > ]
[-VMHost < VMHost > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Location VIContainer named
  • wildcards
Specifies a VApp, ResourcePool, VMHost, or Cluster object where you want to place the new vApp.
required
VApp VApp named
  • pipeline
  • wildcards
Specifies a vApp you want to copy.
optional Datastore Datastore named
  • wildcards
Specifies 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.
optional DiskStorageFormat VirtualDiskStorageFormat named
Specifies the storage format of the disks of the vApp.
optional InventoryLocation FolderContainer named
  • wildcards
Specifies a datacenter or a virtual machine folder where you want to place the new vApp.
optional Name String named
Specifies a name for the new vApp.
optional RunAsync SwitchParameter named
Indicates 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 VMware PowerCLI console.
optional Server VIServer[] named
  • wildcards
Specifies the Center Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.
optional VMHost VMHost named
  • wildcards
Specifies the host where you want to run the copied vApp.
New-VApp
-ContentLibraryItem < ContentLibraryItem >
-Location < VIContainer >
[-Datastore < Datastore > ]
[-DiskStorageFormat < VirtualDiskStorageFormat > ]
[-InventoryLocation < FolderContainer > ]
[-Name < String > ]
[-RunAsync ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
ContentLibraryItem ContentLibraryItem named
  • pipeline
  • wildcards
Specifies the content library template to deploy the vApp from.
required
Location VIContainer named
  • pipeline
  • wildcards
Specifies a VApp, ResourcePool, VMHost, or Cluster object where you want to place the new vApp.
optional Datastore Datastore named
  • wildcards
Specifies 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.
optional DiskStorageFormat VirtualDiskStorageFormat named
Specifies the storage format of the disks of the vApp.
optional InventoryLocation FolderContainer named
  • wildcards
Specifies a datacenter or a virtual machine folder where you want to place the new vApp.
optional Name String named
Specifies a name for the new vApp.
optional RunAsync SwitchParameter named
Indicates 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 VMware PowerCLI console.
optional Server VIServer[] named
  • wildcards
Specifies the Center Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.
New-VApp
-Location < VIContainer >
-Name < String >
[-CpuExpandableReservation < Boolean > ]
[-CpuLimitMhz < Int64 > ]
[-CpuReservationMhz < Int64 > ]
[-CpuSharesLevel < SharesLevel > ]
[-InventoryLocation < FolderContainer > ]
[-MemExpandableReservation < Boolean > ]
[-MemLimitGB < Decimal > ]
[-MemLimitMB < Int64 > ]
[-MemReservationGB < Decimal > ]
[-MemReservationMB < Int64 > ]
[-MemSharesLevel < SharesLevel > ]
[-NumCpuShares < Int32 > ]
[-NumMemShares < Int32 > ]
[-RunAsync ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Location VIContainer named
  • pipeline
  • wildcards
Specifies a VApp, ResourcePool, VMHost, or Cluster object where you want to place the new vApp.
required
Name String named
Specifies a name for the new vApp.
optional CpuExpandableReservation Boolean named
Indicates that the CPU reservation can grow beyond the specified value if there are available resources.
optional CpuLimitMhz Int64 named
Specifies a CPU usage limit in MHz. Utilization will not exceed this limit even if there are available resources.
optional CpuReservationMhz Int64 named
Specifies the CPU size in MHz that is guaranteed to be available.
optional CpuSharesLevel SharesLevel named
Specifies 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.
optional InventoryLocation FolderContainer named
  • wildcards
Specifies a datacenter or a virtual machine folder where you want to place the new vApp.
optional MemExpandableReservation Boolean named
If the value is $true, the memory reservation can grow beyond the specified value if there are available resources.
optional MemLimitGB Decimal named
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.
optional MemLimitMB Int64 named
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.
optional MemReservationGB Decimal named
Specifies the guaranteed available memory in gigabytes (GB).
optional MemReservationMB Int64 named
This parameter is obsolete. Use MemReservationGB instead. Specifies the guaranteed available memory in megabytes (MB).
optional MemSharesLevel SharesLevel named
Specifies 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.
optional NumCpuShares Int32 named
Specifies 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.
optional NumMemShares Int32 named
Specifies 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.
optional RunAsync SwitchParameter named
Indicates 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 VMware PowerCLI console.
optional Server VIServer[] named
  • wildcards
Specifies the Center Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.

Output

VMware.VimAutomation.ViCore.Types.V1.Inventory.VApp

Examples

Example 1

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

Creates a new vApp on the MyVMHost1 host.

Related Commands

VApp

This cmdlet exports a vApp or a single virtual machine to the specified destination.

This cmdlet retrieves vApps.

This cmdlet imports OVF (Open Virtualization Format) and OVA packages. The package can contain a virtual appliance or a virtual machine.

This cmdlet moves the specified virtual appliances to a new location.

This cmdlet creates a new vApp.

This cmdlet removes vApps from the server.

This cmdlet modifies the specified vApp.

This cmdlet starts vApps.

This cmdlet stops vApps.