blob: c3595dd81a2b0a8da3e9796840c4ba6cdbeb9f36 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../includes/main.css" type="text/css">
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon">
<title>Apache CloudStack | The Power Behind Your Cloud</title>
</head>
<body>
<div id="insidetopbg">
<div id="inside_wrapper">
<div class="uppermenu_panel">
<div class="uppermenu_box"></div>
</div>
<div id="main_master">
<div id="inside_header">
<div class="header_top">
<a class="cloud_logo" href="http://cloudstack.org"></a>
<div class="mainemenu_panel"></div>
</div>
</div>
<div id="main_content">
<div class="inside_apileftpanel">
<div class="inside_contentpanel" style="width:930px;">
<div class="api_titlebox">
<div class="api_titlebox_left">
<span>
Apache CloudStack v4.11.0 Root Admin API Reference
</span>
<p></p>
<h1>createTemplate</h1>
<p>Creates a template of a virtual machine. The virtual machine 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.</p>
</div>
<div class="api_titlebox_right">
<a class="api_backbutton" href="../index.html"></a>
</div>
</div>
<div class="api_tablepanel">
<h2>Request parameters</h2>
<table class="apitable">
<tr class="hed">
<td style="width:200px;"><strong>Parameter Name</strong></td><td style="width:500px;">Description</td><td style="width:180px;">Required</td>
</tr>
<tr>
<td style="width:200px;"><strong>displaytext</strong></td><td style="width:500px;"><strong>the display text of the template. This is usually used for display purposes.</strong></td><td style="width:180px;"><strong>true</strong></td>
</tr>
<tr>
<td style="width:200px;"><strong>name</strong></td><td style="width:500px;"><strong>the name of the template</strong></td><td style="width:180px;"><strong>true</strong></td>
</tr>
<tr>
<td style="width:200px;"><strong>ostypeid</strong></td><td style="width:500px;"><strong>the ID of the OS Type that best represents the OS of this template.</strong></td><td style="width:180px;"><strong>true</strong></td>
</tr>
<tr>
<td style="width:200px;"><i>bits</i></td><td style="width:500px;"><i>32 or 64 bit</i></td><td style="width:180px;"><i>false</i></td>
</tr>
<tr>
<td style="width:200px;"><i>details</i></td><td style="width:500px;"><i>Template details in key/value pairs using format details[i].keyname=keyvalue. Example: details[0].hypervisortoolsversion=xenserver61</i></td><td style="width:180px;"><i>false</i></td>
</tr>
<tr>
<td style="width:200px;"><i>isdynamicallyscalable</i></td><td style="width:500px;"><i>true if template contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory</i></td><td style="width:180px;"><i>false</i></td>
</tr>
<tr>
<td style="width:200px;"><i>isfeatured</i></td><td style="width:500px;"><i>true if this template is a featured template, false otherwise</i></td><td style="width:180px;"><i>false</i></td>
</tr>
<tr>
<td style="width:200px;"><i>ispublic</i></td><td style="width:500px;"><i>true if this template is a public template, false otherwise</i></td><td style="width:180px;"><i>false</i></td>
</tr>
<tr>
<td style="width:200px;"><i>passwordenabled</i></td><td style="width:500px;"><i>true if the template supports the password reset feature; default is false</i></td><td style="width:180px;"><i>false</i></td>
</tr>
<tr>
<td style="width:200px;"><i>projectid</i></td><td style="width:500px;"><i>create template for the project</i></td><td style="width:180px;"><i>false</i></td>
</tr>
<tr>
<td style="width:200px;"><i>requireshvm</i></td><td style="width:500px;"><i>true if the template requres HVM, false otherwise</i></td><td style="width:180px;"><i>false</i></td>
</tr>
<tr>
<td style="width:200px;"><i>snapshotid</i></td><td style="width:500px;"><i>the ID of the snapshot the template is being created from. Either this parameter, or volumeId has to be passed in</i></td><td style="width:180px;"><i>false</i></td>
</tr>
<tr>
<td style="width:200px;"><i>templatetag</i></td><td style="width:500px;"><i>the tag for this template.</i></td><td style="width:180px;"><i>false</i></td>
</tr>
<tr>
<td style="width:200px;"><i>url</i></td><td style="width:500px;"><i>Optional, only for baremetal hypervisor. The directory name where template stored on CIFS server</i></td><td style="width:180px;"><i>false</i></td>
</tr>
<tr>
<td style="width:200px;"><i>virtualmachineid</i></td><td style="width:500px;"><i>Optional, VM ID. If this presents, it is going to create a baremetal template for VM this ID refers to. This is only for VM whose hypervisor type is BareMetal</i></td><td style="width:180px;"><i>false</i></td>
</tr>
<tr>
<td style="width:200px;"><i>volumeid</i></td><td style="width:500px;"><i>the ID of the disk volume the template is being created from. Either this parameter, or snapshotId has to be passed in</i></td><td style="width:180px;"><i>false</i></td>
</tr>
</table>
</div>
<div class="api_tablepanel">
<h2>Response Tags</h2>
<table class="apitable">
<tr class="hed">
<td style="width:200px;"><strong>Response Name</strong></td><td style="width:500px;">Description</td>
</tr>
<tr>
<td style="width:200px;"><strong>id</strong></td><td style="width:500px;">the template ID</td>
</tr>
<tr>
<td style="width:200px;"><strong>account</strong></td><td style="width:500px;">the account name to which the template belongs</td>
</tr>
<tr>
<td style="width:200px;"><strong>accountid</strong></td><td style="width:500px;">the account id to which the template belongs</td>
</tr>
<tr>
<td style="width:200px;"><strong>bits</strong></td><td style="width:500px;">the processor bit size</td>
</tr>
<tr>
<td style="width:200px;"><strong>bootable</strong></td><td style="width:500px;">true if the ISO is bootable, false otherwise</td>
</tr>
<tr>
<td style="width:200px;"><strong>checksum</strong></td><td style="width:500px;">checksum of the template</td>
</tr>
<tr>
<td style="width:200px;"><strong>childtemplates</strong></td><td style="width:500px;">if root disk template, then ids of the datas disk templates this template owns</td>
</tr>
<tr>
<td style="width:200px;"><strong>created</strong></td><td style="width:500px;">the date this template was created</td>
</tr>
<tr>
<td style="width:200px;"><strong>crossZones</strong></td><td style="width:500px;">true if the template is managed across all Zones, false otherwise</td>
</tr>
<tr>
<td style="width:200px;"><strong>details</strong></td><td style="width:500px;">additional key/value details tied with template</td>
</tr>
<tr>
<td style="width:200px;"><strong>directdownload</strong></td><td style="width:500px;">KVM Only: true if template is directly downloaded to Primary Storage bypassing Secondary Storage</td>
</tr>
<tr>
<td style="width:200px;"><strong>displaytext</strong></td><td style="width:500px;">the template display text</td>
</tr>
<tr>
<td style="width:200px;"><strong>domain</strong></td><td style="width:500px;">the name of the domain to which the template belongs</td>
</tr>
<tr>
<td style="width:200px;"><strong>domainid</strong></td><td style="width:500px;">the ID of the domain to which the template belongs</td>
</tr>
<tr>
<td style="width:200px;"><strong>format</strong></td><td style="width:500px;">the format of the template.</td>
</tr>
<tr>
<td style="width:200px;"><strong>hostid</strong></td><td style="width:500px;">the ID of the secondary storage host for the template</td>
</tr>
<tr>
<td style="width:200px;"><strong>hostname</strong></td><td style="width:500px;">the name of the secondary storage host for the template</td>
</tr>
<tr>
<td style="width:200px;"><strong>hypervisor</strong></td><td style="width:500px;">the hypervisor on which the template runs</td>
</tr>
<tr>
<td style="width:200px;"><strong>isdynamicallyscalable</strong></td><td style="width:500px;">true if template contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory</td>
</tr>
<tr>
<td style="width:200px;"><strong>isextractable</strong></td><td style="width:500px;">true if the template is extractable, false otherwise</td>
</tr>
<tr>
<td style="width:200px;"><strong>isfeatured</strong></td><td style="width:500px;">true if this template is a featured template, false otherwise</td>
</tr>
<tr>
<td style="width:200px;"><strong>ispublic</strong></td><td style="width:500px;">true if this template is a public template, false otherwise</td>
</tr>
<tr>
<td style="width:200px;"><strong>isready</strong></td><td style="width:500px;">true if the template is ready to be deployed from, false otherwise.</td>
</tr>
<tr>
<td style="width:200px;"><strong>name</strong></td><td style="width:500px;">the template name</td>
</tr>
<tr>
<td style="width:200px;"><strong>ostypeid</strong></td><td style="width:500px;">the ID of the OS type for this template.</td>
</tr>
<tr>
<td style="width:200px;"><strong>ostypename</strong></td><td style="width:500px;">the name of the OS type for this template.</td>
</tr>
<tr>
<td style="width:200px;"><strong>parenttemplateid</strong></td><td style="width:500px;">if Datadisk template, then id of the root disk template this template belongs to</td>
</tr>
<tr>
<td style="width:200px;"><strong>passwordenabled</strong></td><td style="width:500px;">true if the reset password feature is enabled, false otherwise</td>
</tr>
<tr>
<td style="width:200px;"><strong>physicalsize</strong></td><td style="width:500px;">the physical size of the template</td>
</tr>
<tr>
<td style="width:200px;"><strong>project</strong></td><td style="width:500px;">the project name of the template</td>
</tr>
<tr>
<td style="width:200px;"><strong>projectid</strong></td><td style="width:500px;">the project id of the template</td>
</tr>
<tr>
<td style="width:200px;"><strong>removed</strong></td><td style="width:500px;">the date this template was removed</td>
</tr>
<tr>
<td style="width:200px;"><strong>size</strong></td><td style="width:500px;">the size of the template</td>
</tr>
<tr>
<td style="width:200px;"><strong>sourcetemplateid</strong></td><td style="width:500px;">the template ID of the parent template if present</td>
</tr>
<tr>
<td style="width:200px;"><strong>sshkeyenabled</strong></td><td style="width:500px;">true if template is sshkey enabled, false otherwise</td>
</tr>
<tr>
<td style="width:200px;"><strong>status</strong></td><td style="width:500px;">the status of the template</td>
</tr>
<tr>
<td style="width:200px;"><strong>templatetag</strong></td><td style="width:500px;">the tag of this template</td>
</tr>
<tr>
<td style="width:200px;"><strong>templatetype</strong></td><td style="width:500px;">the type of the template</td>
</tr>
<tr>
<td style="width:200px;"><strong>zoneid</strong></td><td style="width:500px;">the ID of the zone for this template</td>
</tr>
<tr>
<td style="width:200px;"><strong>zonename</strong></td><td style="width:500px;">the name of the zone for this template</td>
</tr>
<tr>
<td style="width:200px;"><strong>jobid</strong></td><td style="width:500px;">the ID of the latest async job acting on this object</td>
</tr>
<tr>
<td style="width:200px;"><strong>jobstatus</strong></td><td style="width:500px;">the current status of the latest async job acting on this object</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="comments_thread">
<script type="text/javascript" src="https://comments.apache.org/show_comments.lua?site=test" async="true"></script>
<noscript>
<iframe width="930" height="500" src="https://comments.apache.org/iframe.lua?site=test&amp;page=4.2.0/rootadmin"></iframe>
</noscript>
</div>
<div id="footer_mainmaster">
<p>Copyright &copy; 2015 The Apache Software Foundation, Licensed under the
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0.</a>
<br>
Apache, CloudStack, Apache CloudStack, the Apache CloudStack logo, the CloudMonkey logo and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
</div>
</div>
</div>
</div>
</body>
</html>