vcenter vm template library items: create spec

The create_spec structure defines the information required to create a library item containing a virtual machine template. Warning: This structure is available as technical preview. It may be changed in a future release.

Representation:

{
    "description""string",
    "disk_storage"{
        "datastore""obj-103",
        "storage_policy"{
            "policy""obj-103",
            "type""USE_SPECIFIED_POLICY"
        }
    },
    "disk_storage_overrides"[
        {
            "key""obj-103",
            "value"{
                "datastore""obj-103",
                "storage_policy"{
                    "policy""obj-103",
                    "type""USE_SPECIFIED_POLICY"
                }
            }
        }
    ],
    "library""obj-103",
    "name""string",
    "placement"{
        "cluster""obj-103",
        "folder""obj-103",
        "host""obj-103",
        "resource_pool""obj-103"
    },
    "source_vm""obj-103",
    "vm_home_storage"{
        "datastore""obj-103",
        "storage_policy"{
            "policy""obj-103",
            "type""USE_SPECIFIED_POLICY"
        }
    }
}

Attributes:

Name Type Description
Required
source_vm string Identifier of the source virtual machine to create the library item from. Warning: This attribute is available as technical preview. It may be changed in a future release.

When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: VirtualMachine. When operations return a value of this structure as a result, the field will be an identifier for the resource type: VirtualMachine.

library string Identifier of the library in which the new library item should be created. Warning: This attribute is available as technical preview. It may be changed in a future release.

When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.content.Library. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.content.Library.

Optional
name string Name of the library item. Warning: This attribute is available as technical preview. It may be changed in a future release.

Optional. This field is optional because it was added in a newer version than its parent node.

description string Description of the library item. Warning: This attribute is available as technical preview. It may be changed in a future release.

Optional. If unset, the newly created library item has the same description as the source virtual machine.

vm_home_storage create_spec_vm_home_storage Storage location for the virtual machine template's configuration and log files. Warning: This attribute is available as technical preview. It may be changed in a future release.

Optional. If unset, the virtual machine template's configuration and log files are placed on the default storage backing associated with the library specified by library.

disk_storage create_spec_disk_storage Storage specification for the virtual machine template's disks. Warning: This attribute is available as technical preview. It may be changed in a future release.

Optional. If both disk_storage_overrides and disk_storage are unset, the virtual machine template's disks are placed in the default storage backing associated with the library specified by library.

If disk_storage_overrides is unset and disk_storage is specified, all of the virtual machine template's disks are created with the storage spec specified by disk_storage.

If disk_storage_overrides is specified and disk_storage is unset, disks with identifiers that are not in disk_storage_overrides are placed in the default storage backing associated with the library specified by library.

If both disk_storage_overrides and disk_storage are specified, disks with identifiers that are not in disk_storage_overrides are created with the storage spec specified by disk_storage.

.
disk_storage_overrides list Storage specification for individual disks in the virtual machine template. This is specified as a mapping between disk identifiers in the source virtual machine and their respective storage specifications. Warning: This attribute is available as technical preview. It may be changed in a future release.

Optional. If both disk_storage_overrides and disk_storage are unset, the virtual machine template's disks are placed in the default storage backing associated with the library specified by library.

If disk_storage_overrides is unset and disk_storage is specified, all of the virtual machine template's disks are created with the storage spec specified by disk_storage.

If disk_storage_overrides is specified and disk_storage is unset, disks with identifiers that are not in disk_storage_overrides are placed in the default storage backing associated with the library specified by library.

If both disk_storage_overrides and disk_storage are specified, disks with identifiers that are not in disk_storage_overrides are created with the storage spec specified by disk_storage.

. When clients pass a value of this structure as a parameter, the key in the field key/value pairs must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Disk. When operations return a value of this structure as a result, the key in the field key/value pairs will be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Disk.
placement create_placement_spec Information used to place the virtual machine template. Warning: This attribute is available as technical preview. It may be changed in a future release.

Optional. This field is currently required. In the future, if this field is unset, the system will place the virtual machine template on a suitable resource.

If specified, each field will be used for placement. If the fields result in disjoint placement, the operation will fail. If the fields along with the placement values of the source virtual machine result in disjoint placement, the operation will fail.

.