VMRegisterSpec

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.


Properties

placement Required

Virtual machine placement information. 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.


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
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.


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.

JSON Example

{
    "placement": {
        "folder": "string"
    }
}
Parameter To

Register VM

Feedback

Was this page helpful?