vcenter vm template library items: get
Returns information about a virtual machine template contained in the library item specified by
template_library_item
. Warning: This operation is available as technical preview. It may be changed in a future release.
Request:
HTTP request
GET https://{server}/rest/vcenter/vm-template/library-items/{template_library_item}
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
template_library_item | string | identifier of the library item containing the virtual machine template. |
Response:
HTTP Status Code: 200
Representation:
{
"value": {
"cpu": {
"cores_per_socket": 1,
"count": 1
},
"disks": [
{
"key": "obj-103",
"value": {
"capacity": 1,
"disk_storage": {
"datastore": "obj-103",
"storage_policy": "obj-103"
}
}
}
],
"guest_OS": "DOS",
"memory": {
"size_MiB": 1
},
"nics": [
{
"key": "obj-103",
"value": {
"backing_type": "STANDARD_PORTGROUP",
"mac_type": "MANUAL",
"network": "obj-103"
}
}
],
"vm_home_storage": {
"datastore": "obj-103",
"storage_policy": "obj-103"
},
"vm_template": "obj-103"
}
}
"value": {
"cpu": {
"cores_per_socket": 1,
"count": 1
},
"disks": [
{
"key": "obj-103",
"value": {
"capacity": 1,
"disk_storage": {
"datastore": "obj-103",
"storage_policy": "obj-103"
}
}
}
],
"guest_OS": "DOS",
"memory": {
"size_MiB": 1
},
"nics": [
{
"key": "obj-103",
"value": {
"backing_type": "STANDARD_PORTGROUP",
"mac_type": "MANUAL",
"network": "obj-103"
}
}
],
"vm_home_storage": {
"datastore": "obj-103",
"storage_policy": "obj-103"
},
"vm_template": "obj-103"
}
}
Response Type:
Name | Type | Description |
---|---|---|
bold = required | ||
value | info | Optional. Information about the virtual machine template item contained in the library item. |
value.guest_OS | string | Configured guest operating system of the virtual machine template. Warning: This attribute is available as technical preview. It may be changed in a future release. Defines the valid guest operating system types used for configuring a virtual machine. Value is one of: DOS: MS-DOS. WIN_31: Windows 3.1 WIN_95: Windows 95 WIN_98: Windows 98 WIN_ME: Windows Millennium Edition WIN_NT: Windows NT 4 WIN_2000_PRO: Windows 2000 Professional WIN_2000_SERV: Windows 2000 Server WIN_2000_ADV_SERV: Windows 2000 Advanced Server WIN_XP_HOME: Windows XP Home Edition WIN_XP_PRO: Windows XP Professional WIN_XP_PRO_64: Windows XP Professional Edition (64 bit) WIN_NET_WEB: Windows Server 2003, Web Edition WIN_NET_STANDARD: Windows Server 2003, Standard Edition WIN_NET_ENTERPRISE: Windows Server 2003, Enterprise Edition WIN_NET_DATACENTER: Windows Server 2003, Datacenter Edition WIN_NET_BUSINESS: Windows Small Business Server 2003 WIN_NET_STANDARD_64: Windows Server 2003, Standard Edition (64 bit) WIN_NET_ENTERPRISE_64: Windows Server 2003, Enterprise Edition (64 bit) WIN_LONGHORN: Windows Longhorn (experimental) WIN_LONGHORN_64: Windows Longhorn (64 bit) (experimental) WIN_NET_DATACENTER_64: Windows Server 2003, Datacenter Edition (64 bit) (experimental) WIN_VISTA: Windows Vista WIN_VISTA_64: Windows Vista (64 bit) WINDOWS_7: Windows 7 WINDOWS_7_64: Windows 7 (64 bit) WINDOWS_7_SERVER_64: Windows Server 2008 R2 (64 bit) WINDOWS_8: Windows 8 WINDOWS_8_64: Windows 8 (64 bit) WINDOWS_8_SERVER_64: Windows 8 Server (64 bit) WINDOWS_9: Windows 10 WINDOWS_9_64: Windows 10 (64 bit) WINDOWS_9_SERVER_64: Windows 10 Server (64 bit) WINDOWS_HYPERV: Windows Hyper-V FREEBSD: FreeBSD 10 or earlier FREEBSD_64: FreeBSD 10 x64 or earlier FREEBSD_11: FreeBSD 11. This constant was added in vSphere API 6.7 FREEBSD_12: FreeBSD 12 or later. This constant was added in vSphere API 6.7 FREEBSD_11_64: FreeBSD 11 x64. This constant was added in vSphere API 6.7 FREEBSD_12_64: FreeBSD 12 x64 or later. This constant was added in vSphere API 6.7 REDHAT: Red Hat Linux 2.1 RHEL_2: Red Hat Enterprise Linux 2 RHEL_3: Red Hat Enterprise Linux 3 RHEL_3_64: Red Hat Enterprise Linux 3 (64 bit) RHEL_4: Red Hat Enterprise Linux 4 RHEL_4_64: Red Hat Enterprise Linux 4 (64 bit) RHEL_5: Red Hat Enterprise Linux 5 RHEL_5_64: Red Hat Enterprise Linux 5 (64 bit) (experimental) RHEL_6: Red Hat Enterprise Linux 6 RHEL_6_64: Red Hat Enterprise Linux 6 (64 bit) RHEL_7: Red Hat Enterprise Linux 7 RHEL_7_64: Red Hat Enterprise Linux 7 (64 bit) RHEL_8_64: Red Hat Enterprise Linux 8 (64 bit). This constant was added in vSphere API 6.7 CENTOS: CentOS 4/5 CENTOS_64: CentOS 4/5 (64-bit) CENTOS_6: CentOS 6 CENTOS_6_64: CentOS 6 (64-bit) CENTOS_7: CentOS 7 CENTOS_7_64: CentOS 7 (64-bit) CENTOS_8_64: CentOS 8 (64-bit). This constant was added in vSphere API 6.7 ORACLE_LINUX: Oracle Linux 4/5 ORACLE_LINUX_64: Oracle Linux 4/5 (64-bit) ORACLE_LINUX_6: Oracle Linux 6 ORACLE_LINUX_6_64: Oracle Linux 6 (64-bit) ORACLE_LINUX_7: Oracle Linux 7 ORACLE_LINUX_7_64: Oracle Linux 7 (64-bit) ORACLE_LINUX_8_64: Oracle Linux 8 (64-bit). This constant was added in vSphere API 6.7 SUSE: Suse Linux SUSE_64: Suse Linux (64 bit) SLES: Suse Linux Enterprise Server 9 SLES_64: Suse Linux Enterprise Server 9 (64 bit) SLES_10: Suse linux Enterprise Server 10 SLES_10_64: Suse Linux Enterprise Server 10 (64 bit) (experimental) SLES_11: Suse linux Enterprise Server 11 SLES_11_64: Suse Linux Enterprise Server 11 (64 bit) SLES_12: Suse linux Enterprise Server 12 SLES_12_64: Suse Linux Enterprise Server 12 (64 bit) SLES_15_64: Suse Linux Enterprise Server 15 (64 bit). This constant was added in vSphere API 6.7 NLD_9: Novell Linux Desktop 9 OES: Open Enterprise Server SJDS: Sun Java Desktop System MANDRAKE: Mandrake Linux MANDRIVA: Mandriva Linux MANDRIVA_64: Mandriva Linux (64 bit) TURBO_LINUX: Turbolinux TURBO_LINUX_64: Turbolinux (64 bit) UBUNTU: Ubuntu Linux UBUNTU_64: Ubuntu Linux (64 bit) DEBIAN_4: Debian GNU/Linux 4 DEBIAN_4_64: Debian GNU/Linux 4 (64 bit) DEBIAN_5: Debian GNU/Linux 5 DEBIAN_5_64: Debian GNU/Linux 5 (64 bit) DEBIAN_6: Debian GNU/Linux 6 DEBIAN_6_64: Debian GNU/Linux 6 (64 bit) DEBIAN_7: Debian GNU/Linux 7 DEBIAN_7_64: Debian GNU/Linux 7 (64 bit) DEBIAN_8: Debian GNU/Linux 8 DEBIAN_8_64: Debian GNU/Linux 8 (64 bit) DEBIAN_9: Debian GNU/Linux 9 DEBIAN_9_64: Debian GNU/Linux 9 (64 bit) DEBIAN_10: Debian GNU/Linux 10 DEBIAN_10_64: Debian GNU/Linux 10 (64 bit) ASIANUX_3: Asianux Server 3 ASIANUX_3_64: Asianux Server 3 (64 bit) ASIANUX_4: Asianux Server 4 ASIANUX_4_64: Asianux Server 4 (64 bit) ASIANUX_5_64: Asianux Server 5 (64 bit) ASIANUX_7_64: Asianux Server 7 (64 bit) ASIANUX_8_64: Asianux Server 8 (64 bit). This constant was added in vSphere API 6.7 OPENSUSE: OpenSUSE Linux OPENSUSE_64: OpenSUSE Linux (64 bit) FEDORA: Fedora Linux FEDORA_64: Fedora Linux (64 bit) COREOS_64: CoreOS Linux (64 bit) VMWARE_PHOTON_64: VMware Photon (64 bit) OTHER_24X_LINUX: Linux 2.4x Kernel OTHER_24X_LINUX_64: Linux 2.4x Kernel (64 bit) (experimental) OTHER_26X_LINUX: Linux 2.6x Kernel OTHER_26X_LINUX_64: Linux 2.6x Kernel (64 bit) (experimental) OTHER_3X_LINUX: Linux 3.x Kernel OTHER_3X_LINUX_64: Linux 3.x Kernel (64 bit) OTHER_4X_LINUX: Linux 4.x Kernel. This constant was added in vSphere API 6.7 OTHER_4X_LINUX_64: Linux 4.x Kernel (64 bit). This constant was added in vSphere API 6.7 OTHER_LINUX: Linux 2.2x Kernel GENERIC_LINUX: Other Linux OTHER_LINUX_64: Linux (64 bit) (experimental) SOLARIS_6: Solaris 6 SOLARIS_7: Solaris 7 SOLARIS_8: Solaris 8 SOLARIS_9: Solaris 9 SOLARIS_10: Solaris 10 (32 bit) (experimental) SOLARIS_10_64: Solaris 10 (64 bit) (experimental) SOLARIS_11_64: Solaris 11 (64 bit) OS2: OS/2 ECOMSTATION: eComStation 1.x ECOMSTATION_2: eComStation 2.0 NETWARE_4: Novell NetWare 4 NETWARE_5: Novell NetWare 5.1 NETWARE_6: Novell NetWare 6.x OPENSERVER_5: SCO OpenServer 5 OPENSERVER_6: SCO OpenServer 6 UNIXWARE_7: SCO UnixWare 7 DARWIN: Mac OS 10.5 DARWIN_64: Mac OS 10.5 (64 bit) DARWIN_10: Mac OS 10.6 DARWIN_10_64: Mac OS 10.6 (64 bit) DARWIN_11: Mac OS 10.7 DARWIN_11_64: Mac OS 10.7 (64 bit) DARWIN_12_64: Mac OS 10.8 (64 bit) DARWIN_13_64: Mac OS 10.9 (64 bit) DARWIN_14_64: Mac OS 10.10 (64 bit) DARWIN_15_64: Mac OS 10.11 (64 bit) DARWIN_16_64: Mac OS 10.12 (64 bit) DARWIN_17_64: Mac OS 10.13 (64 bit). This constant was added in vSphere API 6.7 DARWIN_18_64: Mac OS 10.14 (64 bit). This constant was added in vSphere API 6.7 VMKERNEL: VMware ESX 4 VMKERNEL_5: VMware ESX 5 VMKERNEL_6: VMware ESX 6 VMKERNEL_65: VMware ESX 6.5 OTHER: Other Operating System OTHER_64: Other Operating System (64 bit) (experimental) |
value.cpu | cpu_info | CPU configuration of the virtual machine template. Warning: This attribute is available as technical preview. It may be changed in a future release. |
value.cpu.count | long | Number of CPU cores. Warning: This attribute is available as technical preview. It may be changed in a future release. |
value.cpu.cores_per_socket | long | Number of CPU cores per socket. Warning: This attribute is available as technical preview. It may be changed in a future release. |
value.memory | memory_info | Memory configuration of the virtual machine template. Warning: This attribute is available as technical preview. It may be changed in a future release. |
value.memory.size_MiB | long | Memory size in mebibytes. Warning: This attribute is available as technical preview. It may be changed in a future release. |
value.vm_home_storage | vm_home_storage_info | Storage information about 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. |
value.vm_home_storage.datastore | string | Identifier of the datastore where the virtual machine template's configuration and log files are stored. 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: Datastore . When operations return a value of this structure as a result, the field will be an identifier for the resource type: Datastore . |
value.vm_home_storage.storage_policy | string | Identifier of the storage policy associated with 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 do not have a storage policy associated with them.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.spbm.StorageProfile . When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.spbm.StorageProfile . |
value.disks | list | Storage information about the virtual machine template's virtual disks. 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 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 .List of {"key": string, "value": disk_info} |
value.disks[].key | string | |
value.disks[].value | disk_info | |
value.disks[].value.capacity | long | Capacity of the virtual disk in bytes. Warning: This attribute is available as technical preview. It may be changed in a future release. Optional. This field will be unset if the virtual disk is inaccessible. |
value.disks[].value.disk_storage | disk_storage_info | Disk storage related information. Warning: This attribute is available as technical preview. It may be changed in a future release. |
value.disks[].value.disk_storage.datastore | string | Identifier of the datastore where the disk is stored. 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: Datastore . When operations return a value of this structure as a result, the field will be an identifier for the resource type: Datastore . |
value.disks[].value.disk_storage.storage_policy | string | Identifier of the storage policy associated with the virtual disk. Warning: This attribute is available as technical preview. It may be changed in a future release. Optional. If unset, the virtual disk does not have a storage policy associated with it.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.spbm.StorageProfile . When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.spbm.StorageProfile . |
value.nics | list | Information about the virtual machine template's virtual ethernet adapters. 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 key in the field key/value pairs must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Ethernet . 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.Ethernet .List of {"key": string, "value": ethernet_info} |
value.nics[].key | string | |
value.nics[].value | ethernet_info | |
value.nics[].value.backing_type | string | Network backing type for the virtual Ethernet adapter. Warning: This attribute is available as technical preview. It may be changed in a future release. Defines valid network backing types for a virtual Ethernet adapter. Warning: This enumeration is available as technical preview. It may be changed in a future release. Value is one of: STANDARD_PORTGROUP: vSphere standard portgroup network backing. Warning: This constant is available as technical preview. It may be changed in a future release. HOST_DEVICE: Legacy host device network backing. Imported VMs may have virtual Ethernet adapters with this type of backing, but this type of backing cannot be used to create or to update a virtual Ethernet adapter. Warning: This constant is available as technical preview. It may be changed in a future release. DISTRIBUTED_PORTGROUP: Distributed virtual switch backing. Warning: This constant is available as technical preview. It may be changed in a future release. OPAQUE_NETWORK: Opaque network backing. Warning: This constant is available as technical preview. It may be changed in a future release. |
value.nics[].value.mac_type | string | MAC address type of the ethernet adapter. Warning: This attribute is available as technical preview. It may be changed in a future release. Defines the valid MAC address origins for a virtual Ethernet adapter. Warning: This enumeration is available as technical preview. It may be changed in a future release. Value is one of: MANUAL: MAC address is assigned statically. Warning: This constant is available as technical preview. It may be changed in a future release. GENERATED: MAC address is generated automatically. Warning: This constant is available as technical preview. It may be changed in a future release. ASSIGNED: MAC address is assigned by vCenter Server. Warning: This constant is available as technical preview. It may be changed in a future release. |
value.nics[].value.network | string | Identifier of the network backing the virtual Ethernet adapter. Warning: This attribute is available as technical preview. It may be changed in a future release. Optional. This field will be unset if the identifier of the network backing could not be determined.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Network . When operations return a value of this structure as a result, the field will be an identifier for the resource type: Network . |
value.vm_template | string | Identifier of the virtual machine template contained in the library item. This field is used to identify the virtual machine template in legacy APIs. 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.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 . |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
500 | error | if the system reports an error while responding to the request. |
404 | not_found | if the library item could not be found. |
400 | resource_inaccessible | if the virtual machine template's configuration state cannot be accessed. |
503 | service_unavailable | if any of the services involved in the operation are unavailable. |
401 | unauthenticated | if the user that requested the operation cannot be authenticated. |
403 | unauthorized | if the user that requested the operation is not authorized to perform the operation. |