In this final part, we would create and register the template based on the golden/master instance which is currently running. New instances created from this template would have the same customizations and optimizations as the master instance.
So lets get started…
Create The Template
- Stop the golden/master instance (centos65-xen64) from the CloudStack UI
- Wait for the instance to stop. Once stopped, the “Create Template” button option will now be visible under Instance > Volumes > Root Volume tab. Click to create the template.
- Set the Template Name to “CentOS 6.5 (32-bit) XenServer” and Description to “CentOS 6.5 (32-bit) XenServer (YYYYMMDD)”. Its good practice to specify the create time-stamp as it becomes very easy to identify when the image was created or last updated. Example, “CentOS 6.5 (32-bit) XenServer (20140101)”
- Turn on the “Password Enabled” feature as we have built the template with cloudstack-guest-set-password script installed. The OS Type would be either “CentOS 6.4 (32-bit)” or CentOS 6.4 (64-bit)” depending on the architecture.
- The dynamic scaling of RAM and CPU works well with CentOS 6. So lets enable the “Dynamically Scalable” feature also and complete the template registration. Please see Dynamic Scaling Of VMs In CloudStack for more information.
It usually takes a few minutes depending on your primary storage performance. Wait for the notification.
- The newly created template “CentOS 6.5 (32-bit) XenServer” would be listed under the Templates menu and ready for use.
Create New Instance From Template
The newly created template would be visible under My templates tab from the Add Instance wizards. Proceed to create a new instance template based on your fully customized and optimized CentOS template.
Where to go from here
- Create more Linux distribution templates for your end users. The overall process is roughly the same for other Linux distributions like Ubuntu, ArchOS, Gentoo etc. Even for other operating systems linux Windows or FreeBSD, the flow remains the same but the actual steps would differ.
If it’s an OS that’s not listed under “OS Types”, please see What Guest Operating Systems Does CloudStack Support? article.
- Make the template available for for other users. However, only the admin can mark a template as “Public” so contact your CloudStack operator for help.