Import-CIVAppTemplate Command | Vmware PowerCLI Reference

Import-CIVAppTemplate

This cmdlet imports a virtual machine or an OVF package from vCenter Server to vCloud Director as a vApp template.

Syntax

Import-CIVAppTemplate
-OrgVdc < OrgVdc >
-VM < VirtualMachine >
[-Catalog < Catalog > ]
[-ComputerName < String > ]
[-Description < String > ]
[-GoldMaster ]
[-Name < String > ]
[-NoCopy ]
[-ProgressAction < ActionPreference > ]
[-RunAsync ]
[-Server < CIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
OrgVdc OrgVdc named
  • wildcards
Specifies the organization vDC to which you want to add the new object.
required
VM VirtualMachine named
  • pipeline
  • wildcards
Specifies the virtual machine you want to import into vCloud Director. This parameter accepts VirtualMachine objects retrieved from a vCenter Server that has already been registered with vCloud Director. Note: This parameter is only available to Provider Administrators.
optional Catalog Catalog named
  • wildcards
Specifies the catalog where the imported template will be placed.
optional ComputerName String named
Specifies a computer name for the imported object.
optional Description String named
Specifies a description for the imported object.
optional GoldMaster SwitchParameter named
Indicates that the virtual machine is imported as a GoldMaster vApp template.
optional Name String named
Specifies a new name for the new OVF or vApp template. If not specified, the new object takes the name of the vSphere virtual machine.
optional NoCopy SwitchParameter named
Indicates that you want to import the original vSphere object. Otherwise, a copy of the object is imported in the vCloud. Importing the original vSphere object might cause its modification.
optional ProgressAction ActionPreference named
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 CIServer[] named
  • wildcards
Specifies the cloud servers 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-CIServer.
Import-CIVAppTemplate
-SourcePath < String >
[-Catalog < Catalog > ]
[-Name < String > ]
[-ProgressAction < ActionPreference > ]
[-RunAsync ]
[-Server < CIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
SourcePath String named
Specifies a source path to the OVF file containing the vApp template.
optional Catalog Catalog named
  • wildcards
Specifies the catalog where the imported template will be placed.
optional Name String named
Specifies a new name for the new OVF or vApp template. If not specified, the new object takes the name of the vSphere virtual machine.
optional ProgressAction ActionPreference named
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 CIServer[] named
  • wildcards
Specifies the cloud servers 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-CIServer.
Import-CIVAppTemplate
-Name < String >
-Url < String >
[-Catalog < Catalog > ]
[-ProgressAction < ActionPreference > ]
[-RunAsync ]
[-Server < CIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Name String named
Specifies a new name for the new OVF or vApp template. If not specified, the new object takes the name of the vSphere virtual machine.
required
Url String named
Specifies the URL to the OVF file that contains the vApp template.
optional Catalog Catalog named
  • wildcards
Specifies the catalog where the imported template will be placed.
optional ProgressAction ActionPreference named
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 CIServer[] named
  • wildcards
Specifies the cloud servers 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-CIServer.
Import-CIVAppTemplate
-ResumeUpload
-SourcePath < String >
-VAppTemplate < CIVAppTemplate >
[-ProgressAction < ActionPreference > ]
[-RunAsync ]
[-Server < CIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
ResumeUpload SwitchParameter named
Indicates that you want to resume a previously interrupted OVF upload.
required
SourcePath String named
Specifies a source path to the OVF file containing the vApp template.
required
VAppTemplate CIVAppTemplate named
  • pipeline
  • wildcards
Specifies vApp templates that have been previously created but the upload has been interrupted. Use with the ResumeUpload parameter to resume and finalize the import process.
optional ProgressAction ActionPreference named
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 CIServer[] named
  • wildcards
Specifies the cloud servers 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-CIServer.

Output

VMware.VimAutomation.Cloud.Types.V1.CIVAppTemplate

Examples

Example 1

$myCatalog = Get-Catalog MyCatalog
Import-CIVAppTemplate -SourcePath C:\ovfs\WindowsXP\WindowsXP.ovf -Name MyWindowsXPVAppTemplate -Catalog $myCatalog

Imports an OVF formatted virtual machine as a catalog item while specifying VAppTemplate name and catalog.

Example 2

$myCatalog = Get-Catalog MyCatalog
Import-CIVAppTemplate -SourcePath C:\ovfs\WindowsXP\WindowsXP.ovf -Catalog $myCatalog

Imports an OVF formatted virtual machine while specifying only the Catalog to be placed in.

Example 3

Get-CIVAppTemplate MyWindowsXPVAppTemplate | Import-CIVAppTemplate -ResumeUpload -SourcePath C:\ovfs\WindowsXP\WindowsXP.ovf

Resumes upload in case of a network failure. First obtains the not fully uploaded VAppTemplate, then starts the resume process.

Example 4

$myCatalog = Get-Catalog MyCatalog
$myOrgvdc = Get-OrgVdc MyOrgVdc
$myVM = Get-VM -Name 'MyWindowsXP'
Import-CIVAppTemplate -VM $myVM -Name MyWindowsXPVAppTemplate -OrgVdc $myOrgvdc -Catalog $myCatalog

Imports a vSphere virtual machine as a vCloud Director VAppTemplate.

Example 5

$myOrgvdc = Get-OrgVdc MyOrgVdc
$myCatalog = Get-Catalog MyCatalog
$myVM = Get-VM -Name 'MyWindowsXP'
Import-CIVAppTemplate -VM $myVM -Name MyWindowsXPVAppTemplate -OrgVdc $myOrgvdc -Catalog $myCatalog -NoCopy

Imports a vSphere virtual machine as a vCloud Director VAppTemplate. The virtual machine is moved by using the -NoCopy switch.

Example 6

$myCatalog = Get-Catalog MyCatalog
Import-CIVAppTemplate -Url 'http://myVMUrl/myVM.ovf' -Name MyVMVAppTemplate -Catalog $myCatalog

Imports an OVF-formatted virtual machine from the specified URL as a catalog item while specifying a VAppTemplate name and the catalog to be placed in.

Related Commands

CIVApp

This cmdlet retrieves virtual appliances in the cloud.

This cmdlet imports a virtual machine from the underlying vSphere to the cloud.

This cmdlet creates a new vApp.

This cmdlet removes vApps from the cloud.

This cmdlet restarts the specified vApp.

This cmdlet modifies the configuration of the specified vApps in the cloud.

This cmdlet starts the specified vApp.

This cmdlet stops the specified vApp.

This cmdlet suspends the specified vApp.

CIVAppGuest

This cmdlet restarts the guest operating systems of all virtual machines in the specified vApp.

This cmdlet shuts down the guest operating systems of all virtual machines in the specified vApp.

CIVAppNetwork

This cmdlet retrieves the vApp networks available on a vCloud Director server.

This cmdlet creates a new vApp network.

This cmdlet removes the specified vApp networks if they are not in use.

This cmdlet modifies the configuration of the specified vApp networks.

CIVAppStartRule

This cmdlet retrieves the start rules for virtual machines in a specified vApp.

This cmdlet modifies the start rules for virtual machines in the specified vApp.

CIVAppTemplate

This cmdlet retrieves vApp templates.

This cmdlet imports a virtual machine or an OVF package from vCenter Server to vCloud Director as a vApp template.

This cmdlet creates a new vApp template.

This cmdlet removes the specified vApp template.

This cmdlet modifies the configuration of the specified vApp template.