VmTemplateLibraryItemsCreateSpec

The LibraryItems.CreateSpec structure defines the information required to create a library item containing a virtual machine template.


Properties

string
source_vm Required

Identifier of the source virtual machine to create the library item from. 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.


string
library Required

Identifier of the library in which the new library item should be created. 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.


string
name Required

Name of the library item.


placement Required

Information used to place the virtual machine template. 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.


disk_storage Optional

Storage specification for the virtual machine template’s disks. If both LibraryItems.CreateSpec.disk-storage-overrides and LibraryItems.CreateSpec.disk-storage are unset, the virtual machine template’s disks are placed in the default storage backing associated with the library specified by LibraryItems.CreateSpec.library. If LibraryItems.CreateSpec.disk-storage-overrides is unset and LibraryItems.CreateSpec.disk-storage is specified, all of the virtual machine template’s disks are created with the storage spec specified by LibraryItems.CreateSpec.disk-storage.

If LibraryItems.CreateSpec.disk-storage-overrides is specified and LibraryItems.CreateSpec.disk-storage is unset, disks with identifiers that are not in LibraryItems.CreateSpec.disk-storage-overrides are placed in the default storage backing associated with the library specified by LibraryItems.CreateSpec.library.

If both LibraryItems.CreateSpec.disk-storage-overrides and LibraryItems.CreateSpec.disk-storage are specified, disks with identifiers that are not in LibraryItems.CreateSpec.disk-storage-overrides are created with the storage spec specified by LibraryItems.CreateSpec.disk-storage.


disk_storage_overrides Optional

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. If both LibraryItems.CreateSpec.disk-storage-overrides and LibraryItems.CreateSpec.disk-storage are unset, the virtual machine template’s disks are placed in the default storage backing associated with the library specified by LibraryItems.CreateSpec.library. If LibraryItems.CreateSpec.disk-storage-overrides is unset and LibraryItems.CreateSpec.disk-storage is specified, all of the virtual machine template’s disks are created with the storage spec specified by LibraryItems.CreateSpec.disk-storage.

If LibraryItems.CreateSpec.disk-storage-overrides is specified and LibraryItems.CreateSpec.disk-storage is unset, disks with identifiers that are not in LibraryItems.CreateSpec.disk-storage-overrides are placed in the default storage backing associated with the library specified by LibraryItems.CreateSpec.library.

If both LibraryItems.CreateSpec.disk-storage-overrides and LibraryItems.CreateSpec.disk-storage are specified, disks with identifiers that are not in LibraryItems.CreateSpec.disk-storage-overrides are created with the storage spec specified by LibraryItems.CreateSpec.disk-storage.

When clients pass a value of this structure as a parameter, the key in the field map 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 map will be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Disk.


string
description Optional

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


vm_home_storage Optional

Storage location for the virtual machine template’s configuration and log files. If unset, the virtual machine template’s configuration and log files are placed on the default storage backing associated with the library specified by LibraryItems.CreateSpec.library.

JSON Example

{
	"library": "string",
	"name": "string",
	"placement": {},
	"source_vm": "string"
}
Parameter To

Create Library Items

Feedback

Was this page helpful?