Import-CIVApp
This cmdlet imports a virtual machine from the underlying vSphere to the cloud as a vApp. You can import the virtual machine to an already existing vApp or create a new vApp and import the virtual machine into it. Note: This cmdlet is only available to Provider Administrators.
Syntax
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required
|
OrgVdc | OrgVdc | named |
|
Specifies the organization vDC to which you want to import the virtual machine. |
required
|
VM | VirtualMachine | named |
|
Specifies the virtual machine you want to import into the cloud. This parameter accepts VirtualMachine objects retrieved from a vCenter Server that has already been registered with vCloud Director. |
optional | ComputerName | String | named |
|
Specifies a computer name for the imported virtual machine. |
optional | Description | String | named |
|
Specifies a description for the imported virtual machine. |
optional | Name | String | named |
|
Specifies the name of the new vApp that you want to create by importing the selected vSphere virtual machine. If you do not set a name, the newly created vApp inherits the name of the imported virtual machine. |
optional | NoCopy | SwitchParameter | named |
|
Use this parameter if you want to import the original vSphere virtual machine. Otherwise, a copy of the virtual machine is imported in vCloud Director. Importing the original vSphere virtual machine might cause its modification. |
optional | ProgressAction | ActionPreference | named |
|
|
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 |
|
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 | VMName | String | named |
|
Specifies a new name for the virtual machine that you want to import into a vApp. If you do not set a name, the virtual machine is imported with its original name. |
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required
|
VApp | CIVApp | named |
|
Specifies the vApp into which you want to import the virtual machine. |
required
|
VM | VirtualMachine | named |
|
Specifies the virtual machine you want to import into the cloud. This parameter accepts VirtualMachine objects retrieved from a vCenter Server that has already been registered with vCloud Director. |
optional | ComputerName | String | named |
|
Specifies a computer name for the imported virtual machine. |
optional | NoCopy | SwitchParameter | named |
|
Use this parameter if you want to import the original vSphere virtual machine. Otherwise, a copy of the virtual machine is imported in vCloud Director. Importing the original vSphere virtual machine might cause its modification. |
optional | ProgressAction | ActionPreference | named |
|
|
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 |
|
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 | VMName | String | named |
|
Specifies a new name for the virtual machine that you want to import into a vApp. If you do not set a name, the virtual machine is imported with its original name. |
Output
VMware.VimAutomation.Cloud.Types.V1.CIVAppExamples
Example 1
Get-OrgVdc 'MyOrganizationVdc' | Import-CIVApp -VM (Get-VM 'MyVMToImport')
Imports a virtual machine from vSphere into a new cloud virtual appliance.
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.
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.
Example 4
Import-CIVApp -VM (Get-VM 'MyVMToImport') -VApp 'MyVAppToExtend'
Imports a virtual machine from vSphere into an existing cloud virtual appliance.
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.
Related Commands
CIVApp
This cmdlet retrieves virtual appliances in the cloud.
This cmdlet imports a virtual machine from the underlying vSphere to the cloud.
This cmdlet creates a new vApp.
This cmdlet removes vApps from the cloud.
This cmdlet restarts the specified vApp.
This cmdlet modifies the configuration of the specified vApps in the cloud.
This cmdlet starts the specified vApp.
This cmdlet stops the specified vApp.
This cmdlet suspends the specified vApp.
CIVAppGuest
This cmdlet restarts the guest operating systems of all virtual machines in the specified vApp.
This cmdlet shuts down the guest operating systems of all virtual machines in the specified vApp.
CIVAppNetwork
This cmdlet retrieves the vApp networks available on a vCloud Director server.
This cmdlet creates a new vApp network.
This cmdlet removes the specified vApp networks if they are not in use.
This cmdlet modifies the configuration of the specified vApp networks.
CIVAppStartRule
This cmdlet retrieves the start rules for virtual machines in a specified vApp.
This cmdlet modifies the start rules for virtual machines in the specified vApp.
CIVAppTemplate
This cmdlet retrieves vApp templates.
This cmdlet imports a virtual machine or an OVF package from vCenter Server to vCloud Director as a vApp template.
This cmdlet creates a new vApp template.
This cmdlet removes the specified vApp template.
This cmdlet modifies the configuration of the specified vApp template.