VM_RegisterSpec

VM_RegisterSpec
VM_RegisterSpec

The VM.RegisterSpec 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 VM.RegisterSpec.datastore and VM.RegisterSpec.path or by providing VM.RegisterSpec.datastore-path. If VM.RegisterSpec.datastore and VM.RegisterSpec.path are set, VM.RegisterSpec.datastore-path must be unset, and if VM.RegisterSpec.datastore-path is set, VM.RegisterSpec.datastore and VM.RegisterSpec.path must be unset.

JSON Example
{
    "datastore": "string",
    "path": "string",
    "datastore_path": "string",
    "name": "string",
    "placement": {
        "folder": "string",
        "resource_pool": "string",
        "host": "string",
        "cluster": "string"
    }
}
string
datastore
Optional

Identifier of the datastore on which the virtual machine's configuration state is stored. If unset, VM.RegisterSpec.path must also be unset and VM.RegisterSpec.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.

string
path
Optional

Path to the virtual machine's configuration file on the datastore corresponding to {@link #datastore). If unset, VM.RegisterSpec.datastore must also be unset and VM.RegisterSpec.datastore-path must be set.

string
datastore_path
Optional

Datastore path for the virtual machine's configuration file in the format "[datastore name] path". For example "[storage1] Test-VM/Test-VM.vmx". If unset, both VM.RegisterSpec.datastore and VM.RegisterSpec.path must be set.

string
name
Optional

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

placement
Required

The VM.RegisterPlacementSpec structure contains information used to place a virtual machine, created from existing virtual machine files on storage, onto resources within the vCenter inventory.