Import-CIVAppTemplate

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

Syntax

-OrgVdc  <OrgVdc>
-VM  <VirtualMachine>
[-Catalog  <Catalog>]
[-ComputerName  <String>]
[-Description  <String>]
[-GoldMaster]
[-Name  <String>]
[-NoCopy]
[-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
  • wildcards
  • pipeline
  • 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
    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.

    -OrgVdc  <OrgVdc>
    -SourcePath  <String>
    [-Catalog  <Catalog>]
    [-Name  <String>]
    [-RunAsync]
    [-Server  <CIServer[]>]
    [CommonParameters]

    Parameters

    Required Parameter Name Type Position Features Description
    required
    OrgVdc
    OrgVdc named
  • wildcards
  • pipeline
  • Specifies the organization vDC to which you want to add the new object.
    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
    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.

    -ResumeUpload
    -VAppTemplate  <CIVAppTemplate>
    [-RunAsync]
    [-Server  <CIServer[]>]
    [-SourcePath  <String>]
    [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
    VAppTemplate
    CIVAppTemplate named
  • wildcards
  • pipeline
  • 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
    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.
    optional
    SourcePath
    String named Specifies a source path to the OVF file containing the vApp template.

    Output

    VMware.VimAutomation.Cloud.Types.V1.CIVAppTemplate

    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.

    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.

    Related Commands

    Feedback

    Was this page helpful?