Import OVF Template As VM operation


The Import OVF Template As VM operation creates a new virtual machine in the resource pool based on the specified OVF descriptor. This operation also uploads the files associated with the virtual machine entity, such as disk files.

The following table describes the elements for this request. 

Adapter request elements for the Import OVF Template As VM operation

Element

Definition

Required

<operation-type>

Defines the type of the operation: Configure_VM

Yes

<operation-name>

Defines the name of the operation: Import_OVF_Template_As_VM

Yes

<soap-url>

Specifies the URL for the remote SOAP service running on the VMware VirtualCenter

If the <soap-url> element is not specified, the request uses the VirtualCenter Server details specified in the adapter configuration.

Default format for HTTPS: https://<hostName>:<port>/sdk/vim

Default format for HTTP: http://<hostName>:<port>/sdk/vim

Note

If you want to use an HTTP value, you might need to change the configuration of the VMware Infrastructure application.

No

<transport>

Specifies the transport protocol for the message

If the <transport> element is not provided, the request uses the VirtualCenter Server details specified in the adapter configuration.

Valid values: https-rpc (default), http-rpc

Note

If the value of the <transport> element is https-rpc, you must install the security certificate for the VMware Virtual Center to the keystore of the peer on which the adapter is enabled.

No

<user-name>

Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center

If no user name is specified, the request is executed with the user name that is specified in the configuration.

No

<password>

Specifies the password corresponding to <user-name>

Conditional; required if <user-name> is specified

<parameters>

Contains the elements required to execute the operation

Yes

<datacenter>

Specifies the datacenter where you want to import the virtual machine

Valid value: String

Yes

<virtual-machine>

Specifies the name of the new virtual machine that you want to create by importing the OVF template

Valid value: String

Yes

<host-system>

Specifies the target host on which the new virtual machine will run

Valid value: String

No
If the host-system is not specified, you must specify either the parent-virtual-app or the resource-pool element.

<datastore>

Specifies the datastore on which to create the inventory objects associated with the new virtual machine

Valid value: String

Yes

<parent-virtual-app>

Specifies the parent vApp under which the virtual machine is to be imported

No

If you specify this element, the values in the resource-pool and folder elements are ignored.

If you do not specify this element, you must specify either the host-system or resource-pool element.

<resource-pool>

Specifies the resource pool where the virtual machine is to be added

Valid value: String

No

If the resource-pool element is not specified, you must specify either the host-system or the parent-virtual-app element.

<folder>

Specifies the folder to which the virtual machine will be attached

Valid value: String

If you do not specify this element, the default 'vm' folder is used.

No

<ovf-descriptor-file>

Contains the canonical path for the OVF descriptor file

Valid value: String

Yes

The following figure shows a sample adapter request for the Import OVF Template As VM operation.

Sample adapter request for the Import OVF Template As VM operation

<vmware-infrastructure-request>
   <operation-type>Configure_Vm</operation-type>
   <operation-name>Import_OVF_Template_As_VM</operation-name>
   <parameters>
     <datacenter>datacenter1</datacenter>
     <virtual-machine>ImportVM</virtual-machine>
     <host-system>10.118.218.119</host-system>
     <datastore>Storage1</datastore>
     <resource-pool>/BMCOne/host/BMC Cluster/Resources/TestRP</resource-pool>
     <folder>/BMCOne/vm/TestFolder</folder>
     <ovf-descriptor-file>/home/ExportedVM_OVF/ExportedVM.ovf</ovf-descriptor-file>
   </parameters>
 </vmware-infrastructure-request>

The following figure shows the response for the sample Import OVF Template As VM operation.

Sample adapter response for the Import OVF Template As VM operation

<vmware-infrastructure-response>
 <metadata>
   <status>success</status>
 </metadata>
 <ImportVMResponse>
   <virtual-machine>ImportVM</virtual-machine>
 </ImportVMResponse>
</vmware-infrastructure-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*