vcenter VM: register spec

The register_spec structure contains information used to create a virtual machine from existing virtual machine files on storage.

The location of the virtual machine files on storage must be specified by providing either vcenter.VM.register_spec.datastore and vcenter.VM.register_spec.path or by providing vcenter.VM.register_spec.datastore_path. If vcenter.VM.register_spec.datastore and vcenter.VM.register_spec.path are set, vcenter.VM.register_spec.datastore_path must be unset, and if vcenter.VM.register_spec.datastore_path is set, vcenter.VM.register_spec.datastore and vcenter.VM.register_spec.path must be unset.

. This structure was added in vSphere API 6.8.7.

Representation:

{
    "path""string",
    "datastore""obj-103",
    "name""string",
    "placement"{
        "cluster""obj-103",
        "folder""obj-103",
        "host""obj-103",
        "resource_pool""obj-103"
    },
    "datastore_path""string"
}

Attributes:

Name Type Description
Optional
datastore string Identifier of the datastore on which the virtual machine's configuration state is stored. This attribute was added in vSphere API 6.8.7.

Optional. If unset, vcenter.VM.register_spec.path must also be unset and vcenter.VM.register_spec.datastore_path must be set.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Datastore. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Datastore.

path string Path to the virtual machine's configuration file on the datastore corresponding to {@link #datastore). This attribute was added in vSphere API 6.8.7.

Optional. If unset, vcenter.VM.register_spec.datastore must also be unset and vcenter.VM.register_spec.datastore_path must be set.

datastore_path string Datastore path for the virtual machine's configuration file in the format "[datastore name] path". For example "[storage1] Test-VM/Test-VM.vmx". This attribute was added in vSphere API 6.8.7.

Optional. If unset, both vcenter.VM.register_spec.datastore and vcenter.VM.register_spec.path must be set.

name string Virtual machine name. This attribute was added in vSphere API 6.8.7.

Optional. If unset, the display name from the virtual machine's configuration file will be used.

placement register_placement_spec Virtual machine placement information. This attribute was added in vSphere API 6.8.7.

Optional. This field is currently required. In the future, if this field is unset, the system will attempt to choose suitable resources on which to place the virtual machine.

placement.folder string Virtual machine folder into which the virtual machine should be placed.

Optional. This field is currently required. In the future, if this field is unset, the system will attempt to choose a suitable folder for the virtual machine; if a folder cannot be chosen, the virtual machine creation operation will fail.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Folder. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Folder.

placement.resource_pool string Resource pool into which the virtual machine should be placed.

Optional. This field is currently required if both host and cluster are unset. In the future, if this field is unset, the system will attempt to choose a suitable resource pool for the virtual machine; if a resource pool cannot be chosen, the virtual machine creation operation will fail.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: ResourcePool. When operations return a value of this structure as a result, the field will be an identifier for the resource type: ResourcePool.

placement.host string Host onto which the virtual machine should be placed.

If host and resource_pool are both specified, resource_pool must belong to host.

If host and cluster are both specified, host must be a member of cluster.

Optional. This field may be unset if resource_pool or cluster is specified. If unset, the system will attempt to choose a suitable host for the virtual machine; if a host cannot be chosen, the virtual machine creation operation will fail.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: HostSystem. When operations return a value of this structure as a result, the field will be an identifier for the resource type: HostSystem.

placement.cluster string Cluster into which the virtual machine should be placed.

If cluster and resource_pool are both specified, resource_pool must belong to cluster.

If cluster and host are both specified, host must be a member of cluster.

Optional. If resource_pool or host is specified, it is recommended that this field be unset.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: ClusterComputeResource. When operations return a value of this structure as a result, the field will be an identifier for the resource type: ClusterComputeResource.