Managing Server Templates

Defines a Server Template and lists the available operations for managing it.

A cloud user uses a server template to create a vServer. The server template specifies the type of operating system and how the operating system is installed in the vServer.

The APIs and CLI provide operations for:

Use either the cloud infrastructure API actions or the cloud infrastructure CLI command to perform these operations.

About Server Templates

Describes the purpose of a server template and lists its attributes.

A server template generates a vServer for an account. Server templates are specific to the processor architecture of the server pool and to the virtualization type. The operating system can be specified as an OS image or as an operating system distribution.

Server templates cannot be changed, other than changing the name or description. A server template has the following attributes:

  • Minimum and default vServer type

  • User and unique name

  • Version

  • Owner

  • Location

  • HA enabled

  • Life cycle aware

Server templates are bound to a specific account. A new server template can be uploaded as follows:

  • Based on an existing vServer

  • From a single virtual machine template

  • From an assembly. When you upload an assembly, snapshots can be also created as result

Uploading a Server Template from a vServer

Lists the API action and CLI command for uploading a server template from a vServer.

A cloud user can save a server template from a stopped vServer. When a user creates a vServer based on a server template, it is common to install additional software or to configure certain aspects that can be conserved and reused. To conserve the state, the user must save the vServer as a new server template.


Cloud Infrastructure API Action Cloud Infrastructure CLI Command

RegisterServerTemplateFromVserverRequest

iaas-create-server-template-from-vserver


Example 3-29 Uploading a server template from a vServer using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=RegisterServerTemplateFromVserver&AccessKeyId=AK_2&name=mySTfromVserver&vserverId=VSRV-fdba0b48-6e1c-4f41-bde4-2c739dfeeb2&Version=1&Timestamp=1324422880552&Expires=1324423180552f&SignatureMethod=SHA512withRSA&SignatureVersion=1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST

Example 3-30 Uploading a server template from a vServer using the Cloud Infrastructure CLI

iaas-create-server-template-from-vserver --base-url https://<EnterpriseControllerHostname>/ --access-key-file ak.file --name myST --vserver-id VSRV-a959be32-6237-40c7-b44b-47d392e7a0ac

Uploading a Server Template from a URL

Lists the API action and CLI command for uploading a server template from a URL.

A cloud user can register a server template based on a file for a single virtual machine template that is ready to be deployed into virtualized platforms. Templates can be of the format .tgz, .tar, or other file types. The file must be accessible through a URL.


Cloud Infrastructure API Action Cloud Infrastructure CLI Command

RegisterServerTemplateFromUrlRequest

iaas-create-server-template-from-url


Example 3-31 Uploading a server template from a URL using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=RegisterServerTemplateFromUrl&Version=1&Timestamp=1320096741216&Expires=1320097041216&name=myST&url=http%3A%2F%2example.com%2Fvm-templates%2FOVM_EL52_jeos_i386_PVM_WebLogic10gR3_v10.tar.gz&AccessKeyId=AK_3&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-32 Uploading a server template from a URL using the Cloud Infrastructure CLI

iaas-create-server-template-from-url --base-url https://<EnterpriseControllerHostname>/ --access-key-file ak.file --name myAssembly --url http://myServer.com/myTemplate.tar.gz

Uploading a Server Template from an Assembly

Lists the API action and CLI command for uploading a server template from an assembly.

A cloud user can upload a server template based on an assembly.

An assembly is a collection of interrelated software appliances that can include a configuration of multiple virtual machines with their virtual disks and their interconnectivity. An assembly is contained in a single .ova (Open Virtualization Format Archive) file. The assembly file must be accessible through a URL.

When you upload an assembly, snapshots might be also created. When an assembly contains multiple virtual machines, each virtual machine is unpacked into its own server template. Names of the new server templates are taken from the assembly. Each new server template has a tag to identify the assembly it belongs to. This tag is assemblyKey, and its value is the original assembly ID returned from this action.


Cloud Infrastructure API Action Cloud Infrastructure CLI Command

RegisterServerTemplatesFromAssemblyRequest

iaas-create-server-template-from-assembly


Example 3-33 Uploading a server template from an assembly using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=RegisterServerTemplatesFromAssembly&AccessKeyId=AK_3&url=http%3A%2F%2Fexample.com%3A8888%2FmyAssembly.ova&Version=1&Timestamp=1320097901377&Expires=1320098201377&SignatureMethod=SHA512withRSA&SignatureVersion=1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST

Example 3-34 Uploading a server template from an assembly using the Cloud Infrastructure CLI

iaas-create-server-template-from-assembly --base-url https://<EnterpriseControllerHostname>/ --access-key-file ak.file --name myAssembly --url http://myServer.com/myAssembly.ova

Viewing Server Template Information

Lists the API action and CLI command for displaying a server template.

A cloud user can get information about server templates. The cloud user can restrict the server templates included in the results by specifying filters.

The information includes details about the server templates of an account and all other server templates registered for public use. The server template attributes displayed are:

  • ID

  • Name

  • Description

  • Status

  • Size

  • Public

  • Image type

  • Read-only


Cloud Infrastructure API Action Cloud Infrastructure CLI Command

DescribeServerTemplatesRequest

iaas-describe-server-templates


Example 3-35 Viewing server template information using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DescribeServerTemplates&Version=1&Timestamp=1320088801876&Expires=1320089101876&AccessKeyId=AK_3&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-36 Viewing server template information using the Cloud Infrastructure CLI

iaas-describe-server-templates --base-url https://<EnterpriseControllerHostname>/ --access-key-file ak.file -H

Deleting a Server Template

Lists the API action and CLI command for deleting a server template.

A cloud user can delete a server template. All data associated with the server template is deleted. The deletion of a server template does not affect any vServers that were created from the server template.


Cloud Infrastructure API Action Cloud Infrastructure CLI Command

DeregisterServerTemplateRequest

iaas-delete-server-template


Example 3-37 Deleting a server template using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DeregisterServerTemplate&AccessKeyId=AK_3&serverTemplateId=TMPL-f089b985-f7fc-4b8a-a5f8-df8f44c95f3c&Version=1&Timestamp=1320098301701&Expires=1320098601701&SignatureMethod=SHA512withRSA&SignatureVersion=1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST

Example 3-38 Deleting a server template using the Cloud Infrastructure CLI

iaas-delete-server-template --base-url https://<EnterpriseControllerHostname>/ --access-key-file ak.file --server-template-id TMPL-aaaaaaa8-bbb4-ccc4-ddd4-eeeeeeeeee03