You can use vApp templates to instantiate vApps. After creating the vApp, you can modify its settings to minimize the consumption of computing and storage resources.

Verify that you are connected to a vCloud Director server.

1

Retrieve the organization vDC to which you want to add the new vApp.

$myOrgVdc = Get-OrgVdc -Name 'MyOrgVdc'
2

Retrieve the source vApp template for your new vApp.

$myVAppTemplate = Get-CIVAppTemplate -Name 'MyVAppTemplate'
3

Create your new vApp.

$myVApp = New-CIVApp -Name 'MyVApp' -VAppTemplate $myVAppTemplate -OrgVdc $myOrgVDC

By default, the vApp is powered off.

4

Renew the runtime lease for the new vApp and set it to 12 hours.

Set-CIVApp -VApp $myVApp -RuntimeLease "12:0:0" –RenewLease

To set leases, you can use the days.hours:minutes:seconds syntax.

5

Start the new vApp.

Start-CIVApp -VApp $myVApp