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 | No |
<transport> | Specifies the transport protocol for the message | No |
<user-name> | Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center | 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 | Yes |
<virtual-machine> | Specifies the name of the new virtual machine that you want to create by importing the OVF template | Yes |
<host-system> | Specifies the target host on which the new virtual machine will run | No |
<datastore> | Specifies the datastore on which to create the inventory objects associated with the new virtual machine | Yes |
<parent-virtual-app> | Specifies the parent vApp under which the virtual machine is to be imported | No |
<resource-pool> | Specifies the resource pool where the virtual machine is to be added | No |
<folder> | Specifies the folder to which the virtual machine will be attached | No |
<ovf-descriptor-file> | Contains the canonical path for the OVF descriptor file | 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
<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
<metadata>
<status>success</status>
</metadata>
<ImportVMResponse>
<virtual-machine>ImportVM</virtual-machine>
</ImportVMResponse>
</vmware-infrastructure-response>