PowerCLI Reference

Import-CIVAppTemplate

Synopsis

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

Syntax

Import-CIVAppTemplate [-VM] <VirtualMachine> [-Catalog <Catalog>] [-ComputerName <String>] [-Description <String>] [-Name <String>] -OrgVdc <OrgVdc> [-NoCopy] [-GoldMaster] [-RunAsync] [-Server <CIServer[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Import-CIVAppTemplate [-Catalog <Catalog>] [-Name <String>] -SourcePath <String> -OrgVdc <OrgVdc> [-RunAsync] [-Server <CIServer[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Import-CIVAppTemplate [-SourcePath <String>] -VAppTemplate <CIVAppTemplate> -ResumeUpload [-RunAsync] [-Server <CIServer[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVApp
Get-CIVAppTempate
Import-CIVApp

Detailed Description

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

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
VMVirtualMachineSpecifies 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.truetrue (ByValue)
CatalogCatalogSpecifies the catalog where the imported template will be placed.falsefalse
ComputerNameStringSpecifies a computer name for the imported object.falsefalse
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
DescriptionStringSpecifies a description for the imported object.falsefalse
GoldMasterSwitchParameterIndicates that the virtual machine is imported as a GoldMaster vApp template.falsefalse
InformationActionActionPreferencefalsefalse
InformationVariableStringfalsefalse
NameStringSpecifies a new name for the new OVF or vApp template. If not specified, the new object takes the name of the vSphere virtual machine.falsefalse
NoCopySwitchParameterIndicates 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.falsefalse
OrgVdcOrgVdcSpecifies the organization vDC to which you want to add the new object.truefalse
PipelineVariableStringfalsefalse
ResumeUploadSwitchParameterIndicates that you want to resume a previously interrupted OVF upload.truefalse
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 VMware PowerCLI console.falsefalse
ServerCIServer[]Specifies the cloud servers 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-CIServer.falsefalse
SourcePathStringSpecifies a source path to the OVF file containing the vApp template.truefalse
VAppTemplateCIVAppTemplateSpecifies 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.truetrue (ByValue)
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 imported CIVAppTemplate objects

Notes

Examples

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

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

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

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

$myorganizationvdc = Get-OrgVdc MyOrgVdc
Import-CIVAppTemplate -SourcePath C:\ovfs\WindowsXP\WindowsXP.ovf -OrgVdc $myOrgvdc

Imports an OVF formatted virtual machine while specifying only the organization virtual datacenter 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.


Note: You must be connected to a vCenter Server and a vCloud Director server.

-------------- 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.

Note: You must be connected to a vCenter Server and a vCloud Director server.


Copyright © VMware, Inc. All rights reserved.