vSphere PowerCLI Reference

Import-CIVApp

Synopsis

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

Syntax

Import-CIVApp [-VM] <VirtualMachine> [-ComputerName <String>] [-Description <String>] [-Name <String>] [-NoCopy] [-Server <CIServer[]>] -OrgVdc <OrgVdc> [-WhatIf] [-Confirm] [<CommonParameters>]
Import-CIVApp [-VM] <VirtualMachine> [-ComputerName <String>] [-NoCopy] [-Server <CIServer[]>] -VApp <CIVApp> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVApp
Get-CloudVAppTempate
Import-CloudVAppTempate

Detailed Description

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

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
VMVirtualMachineSpecify the virtual machine you want to import into the vCloud. This parameter takes VirtualMachine objects retrieved from a vCenter Server that has already been registered with the vCloud.truetrue (ByValue)
ComputerNameStringSpecify a computer name for the imported virtual machine.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
DescriptionStringSpecify a description for the imported virtual machine.falsefalse
NameStringSpecify a new name for the imported virtual machine. If not specified, the imported virtual machine takes the name of the vSphere virtual machine.falsefalse
NoCopySwitchParameterUse 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.falsefalse
OrgVdcOrgVdcSpecify the organization VDC to which you want to import the virtual machine.truetrue (ByValue)
ServerCIServer[]Specify 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
VAppCIVAppSpecify the virtual appliance into which you want to import the virtual machine.truetrue (ByValue)
WhatIfSwitchParameterIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

CIVApp

Notes

Examples

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

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

(Get-VM 'MyVMToImport') | Import-CIVApp -OrgVdc 'MyOrganizationVdc' -Name 'MyNewVApp' -Description "My New VApp 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 --------------

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

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

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.


Copyright © 1998 - 2012 VMware, Inc. All rights reserved.