Apache CloudStack 4.23.0.0 Root Admin API Reference
createTemplate
Creates a Template of an Instance. The Instance must be in a STOPPED state. A Template created from this command is automatically designated as a private Template visible to the account that created it.
Request parameters
| Parameter Name | Description | Required |
| name | The name of the Template | true |
| ostypeid | The ID of the OS Type that best represents the OS of this Template. | true |
| account | an optional accountName. Must be used with domainId. | false |
| arch | the CPU arch of the template. Valid options are: x86_64, aarch64, s390x. Defaults to x86_64 | false |
| bits | 32 or 64 bit | false |
| details | Template details in key/value pairs using format details[i].keyname=keyvalue. Example: details[0].hypervisortoolsversion=xenserver61 | false |
| displaytext | The display text of the Template, defaults to the 'name'. | false |
| domainid | an optional domainId. If the account parameter is used, domainId must also be used. | false |
| isdynamicallyscalable | True if Template contains XS/VMWare tools in order to support dynamic scaling of Instance CPU/memory | false |
| isfeatured | True if this Template is a featured Template, false otherwise | false |
| ispublic | True if this Template is a public Template, false otherwise | false |
| passwordenabled | True if the Template supports the password reset feature; default is false | false |
| projectid | Create Template for the project | false |
| requireshvm | True if the Template requires HVM, false otherwise | false |
| snapshotid | The ID of the Snapshot the Template is being created from. Either this parameter, or volumeId has to be passed in | false |
| sshkeyenabled | True if the Template supports the SSHkey upload feature; default is false | false |
| templatetag | The tag for this Template. | false |
| url | Optional, only for baremetal hypervisor. The directory name where Template stored on CIFS server | false |
| virtualmachineid | Optional, Instance ID. If this presents, it is going to create a baremetal Template for Instance this ID refers to. This is only for Instance whose hypervisor type is BareMetal | false |
| volumeid | The ID of the disk volume the Template is being created from. Either this parameter, or snapshotId has to be passed in | false |
| zoneid | the zone for the template. Can be specified with snapshot only | false |
Response Tags
| Response Name | Description |
| id | The Template ID |
| account | The Account name to which the Template belongs |
| accountid | The Account id to which the Template belongs |
| arch | CPU Arch of the template |
| bits | The processor bit size |
| bootable | True if the ISO is bootable, false otherwise |
| checksum | Checksum of the Template |
| childtemplates | If root disk Template, then IDs of the datas disk Templates this Template owns |
| created | The date this Template was created |
| crossZones | True if the Template is managed across all Zones, false otherwise |
| deployasis | VMware only: true if Template is deployed without orchestrating disks and Networks but "as-is" defined in the Template. |
| deployasisdetails | VMware only: additional key/value details tied with deploy-as-is Template |
| details | Additional key/value details tied with Template |
| directdownload | KVM Only: true if Template is directly downloaded to Primary Storage bypassing Secondary Storage |
| displaytext | The Template display text |
| domain | The name of the domain to which the Template belongs |
| domainid | The ID of the domain to which the Template belongs |
| domainpath | Path of the Domain the template belongs to |
| downloaddetails | Lists the download progress of a Template across all secondary storages |
| extensionid | The ID of extension linked to this template |
| extensionname | The name of extension linked to this template |
| forcks | If true it indicates that the template can be used for CKS cluster deployments |
| format | The format of the Template. |
| hostid | The ID of the secondary storage host for the Template |
| hostname | The name of the secondary storage host for the Template |
| hypervisor | The hypervisor on which the Template runs |
| icon | Base64 string representation of the resource icon |
| isdynamicallyscalable | True if Template contains XS/VMWare tools in order to support dynamic scaling of Instance CPU/memory |
| isextractable | True if the Template is extractable, false otherwise |
| isfeatured | True if this Template is a featured Template, false otherwise |
| ispublic | True if this Template is a public Template, false otherwise |
| isready | True if the Template is ready to be deployed from, false otherwise. |
| name | The Template name |
| ostypeid | The ID of the OS type for this Template. |
| ostypename | The name of the OS type for this Template. |
| parenttemplateid | If Datadisk Template, then id of the root disk Template this Template belongs to |
| passwordenabled | True if the reset password feature is enabled, false otherwise |
| physicalsize | The physical size of the Template |
| project | The project name of the Template |
| projectid | The project ID of the Template |
| removed | The date this Template was removed |
| requireshvm | True if Template requires HVM enabled, false otherwise |
| size | The size of the Template |
| sourcetemplateid | The Template ID of the parent Template if present |
| sshkeyenabled | True if Template is sshkey enabled, false otherwise |
| status | The status of the Template |
| templatetag | The tag of this Template |
| templatetype | The type of the Template |
| url | The URL which the Template/ISO is registered from |
| userdataid | The id of userdata linked to this Template |
| userdataname | The name of userdata linked to this Template |
| userdataparams | List of parameters which contains the list of keys or string parameters that are needed to be passed for any variables declared in userdata |
| userdatapolicy | The userdata override policy with the userdata provided while deploying Instance |
| zoneid | The ID of the zone for this Template |
| zonename | The name of the zone for this Template |
| jobid | the ID of the latest async job acting on this object |
| jobstatus | the current status of the latest async job acting on this object |