powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Import-CIVAppTemplate



NAME
Import-CIVAppTemplate

SYNOPSIS
Imports a virtual machine or an OVF package from a vSphere server to the vCloud as a virtual appliance template.

SYNTAX
Import-CIVAppTemplate [-VM] [-Catalog ] [-ComputerName ] [-Description ]
[-Name ] -OrgVdc [-NoCopy] [-GoldMaster] [-Server ] [-WhatIf] [-Confirm] [ eters>]

Import-CIVAppTemplate [-Catalog ] [-Name ] -SourcePath -OrgVdc [-Server r[]>] [-WhatIf] [-Confirm] []

Import-CIVAppTemplate [-SourcePath ] -VAppTemplate -ResumeUpload [-Server ] [-
WhatIf] [-Confirm] []


DESCRIPTION
Imports a virtual machine or an OVF package from a vSphere server to the vCloud as a virtual appliance template.


PARAMETERS
-VM
Specify the virtual machine you want to import into the vCloud. This parameter takes VirtualMachine objects ret
rieved from a vCenter Server that has already been registered with the vCloud. Note: This parameter is only ava
ilable to Provider Administrators.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-Catalog
Specify the catalog where the imported template will be placed.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-ComputerName
Specify a computer name for the imported object.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Description
Specify a description for the imported object.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Name
Specify a new name for the new OVF or virtual appliance template. If not specified, the new object takes the na
me of the vSphere virtual machine.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-OrgVdc
Specify the organization VDC to which you want to create the new object.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-NoCopy
Use this parameter if you want to import the original vSphere object. Otherwise, a copy of the object is import
ed in the vCloud. Importing the original vSphere object might cause its modification.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-GoldMaster
Indicate that the virtual machine is imported as a GoldMaster virtual appliance template.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Server
Specify the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the comm
and runs on the default servers. For more information about default servers, see the description of Connect-CIS
erver.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-WhatIf
Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modi
fied.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

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

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-SourcePath
Specify a source path to the OVF file containing the virtual appliance template.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-VAppTemplate
Specify virtual appliance templates that have been previously created but the upload has been interrupted. Use
with the ResumeUpload parameter to resume and finalize the import process.

Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-ResumeUpload
Indicate that you want to resume a previously interrupted OVF upload.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
CIVAppTemplate


NOTES




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

C:\PS>$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 organiza
tion virtual datacenter.





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

C:\PS>$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 --------------

C:\PS>Get-CIVAppTemplate MyWindowsXPVAppTemplate | Import-CIVAppTemplate -ResumeUpload -SourcePath C:\ovfs\WindowsX
P\WindowsXP.ovf


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





-------------- Example 4 --------------

C:\PS>$myCatalog = Get-Catalog MyCatalog

$myOrgvdc = Get-OrgVdc MyOrgVdc

Get-VM MyWindowsXP | Import-CIVAppTemplate -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 --------------

C:\PS>$myOrgvdc = Get-OrgVdc MyOrgVdc

$myCatalog = Get-Catalog MyCatalog

Get-VM MyWindowsXP | Import-CIVAppTemplate -Name MyWindowsXPVAppTemplate -OrgVdc $myOrgvdc -Catalog $myCatalog รข?"N
oCopy


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

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






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Import-CIVAppTemplate.html
Get-CIVApp
Get-CloudVAppTempate
Import-CIVApp