powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Import-CIVApp



NAME
Import-CIVApp

SYNOPSIS
Imports a virtual machine from the underlying vSphere to a cloud.

SYNTAX
Import-CIVApp [-VM] [-ComputerName ] [-Description ] [-Name ] [-NoCopy] [-
Server ] -OrgVdc [-WhatIf] [-Confirm] []

Import-CIVApp [-VM] [-ComputerName ] [-NoCopy] [-Server ] -VApp [-Wha
tIf] [-Confirm] []


DESCRIPTION
Imports a virtual machine from the underlying vSphere to the vCloud as a virtual appliance. You can import the vir
tual machine to an already existing virtual appliance or create a new virtual appliance and import the virtual mach
ine into it. Note: This cmdlet is only available to Provider Administrators.


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.

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

-ComputerName
Specify a computer name for the imported virtual machine.

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

-Description
Specify a description for the imported virtual machine.

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

-Name
Specify a new name for the imported virtual machine. If not specified, the imported virtual machine takes the n
ame of the vSphere virtual machine.

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

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

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

-OrgVdc
Specify the organization VDC to which you want to import the virtual machine.

Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
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

-VApp
Specify the virtual appliance into which you want to import the virtual machine.

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


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
CIVApp


NOTES




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

C:\PS>Get-OrgVdc 'MyOrganizationVdc' | Import-CIVApp -VM (Get-VM 'MyVMToImport')


Imports a virtual machine from vSphere into a new cloud virtual appliance.

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





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

C:\PS>(Get-VM 'MyVMToImport') | Import-CIVApp -OrgVdc 'MyOrganizationVdc' -Name 'MyNewVApp' -Description "My New VA
pp Description" -ComputerName "MyComputer"


Imports a virtual machine from vSphere into a new cloud virtual appliance (Vapp) while specifying the new VApp name
, its description and the virtual machine computer name.

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





-------------- Example 3 --------------

C:\PS>Import-CIVApp -VM (Get-VM 'MyVMToImport') -OrgVdc 'MyOrganizationVdc' -NoCopy


Imports a virtual machine from vSphere into a new cloud virtual appliance by moving it instead of copying it.

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





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

C:\PS>Import-CIVApp -VM (Get-VM 'MyVMToImport') -VApp 'MyVAppToExtend'


Imports a virtual machine from vSphere into an existing cloud virtual appliance.

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





-------------- Example 5 --------------

C:\PS>Get-CIVApp "MyVAppToExtend" | Import-CIVApp (Get-VM 'MyVMToImport') -NoCopy


Imports a VM from vSphere into an existing cloud VApp by moving it instead of copying it.

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-CIVApp.html
Get-CIVApp
Get-CloudVAppTempate
Import-CloudVAppTempate