location


The location of resources that the newly cloned virtual machine uses.

The following table contains the definition for the child elements of location.

Child elements -location

Element

Definition

Required

<resource-pool>

Specifies the resource pool to which the virtual machine should be attached

If the argument is not supplied, the current resource pool of the virtual machine is used.

Conditional

If cluster-compute-resource is not specified

<cluster-compute-resource>

Specifies the cluster compute resource used to make the method call

Conditional

If resource-pool is not specified

<host-system>

Specifies the DNS name of the target host for the virtual machine

  • If resource pool is not specified, the current host is used.
  • If resource pool is specified, and the target pool represents a stand-alone host, the host is used
  • If resource pool is specified, and the target pool represents a DRS-enabled cluster, a host selected by DRS is used.
  • If resource pool is specified and the target pool represents a cluster without DRS enabled, an InvalidArgument exception is thrown.
    Valid value: DNS name

Conditional

If the virtual machine has to be added to the default resource pool of the host and the host is a stand-alone host

<datastore>

Specifies the data store where the virtual machine should be located

No

<transform>

Specifies the transformation to perform on the disks

The backend is free to ignore this hint if it is not valid for the current operation. This can be used by clients, for example, to create sparse disks for templates.

Valid values: flat, sparse

No

<disk-list>

Specifies the optional list that allows specifying the datastore location for each virtual disk

Sample format:

<disk-list>
 <disk>
 <datastore></datastore>
  <disk-name></disk-name>
 </disk>
<disk>
  <datastore></datastore>
  <disk-name></disk-name>
 </disk>
......
</disk-list>


Note

The specified disk must exist on the original virtual machine.

No

The following figure shows the sample for location.

XML Sample for location

<location>
    <resource-pool>Resources</resource-pool>
    <cluster-compute-resource>TestCluster</cluster-compute-resource>
    <host-system>xyz.bmc.com</host-system>
    <datastore>storage1</datastore>
    <transform>flat</transform>
    <disk-list>
        <disk>
            <disk-name>Hard Disk 1</disk-name>
            <datastore>storage1</datastore>
        </disk>
    </disk-list>
</location>

 

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