Manage VM templates
- 1 Display VM templates
- 2 Organize VM templates into categories
- 3 Copy a VM template
- 4 Introduction to mobility
- 5 Export VM templates to datacenters and public cloud
- 6 Delete a VM template
- 7 Manage instance templates in datacenters
- 8 Manage instance templates in public cloud
- 9 Delete private templates in public cloud
- 10 Other Pages related to VM template management
This page describes how to manage VM templates that are already in the Catalogue
Display VM templates
This section describes how to display VM templates in the catalogue.
To display VM templates:
Select Private or Public
Select a Datacenter or Public cloud region from the list
If you do not see the expected templates, click the round-arrow Refresh button beside the Datacenter name or contact your system administrator
Optionally, select a template Category
Optionally, select icon or list view
On the right, the platform will display all the templates available for the selected datacenter or public cloud region.
You can also search and filter VM templates in the same way as for VMs and other entitites.
Privileges: Manage VM templates from Catalogue
Icon view
In Icon view, to activate the VM template operations menu, select a VM template. This menu will vary, depending on the context.
Screenshot: Options menu of VM template
Screenshot: Options menu of a VM instance template, created from VM disks
In list view, to display the VM Template operations buttons, select a VM template.
Organize VM templates into categories
In the Catalogue, the VM templates can be classified into categories:
Local categories belong to a single enterprise and cannot be seen or used by other enterprise
Global categories are visible to all users and are marked with the text
(global)
, and you will require theManage VM template global categories
privilege to manage them.
The predefined categories are Applications servers
, Database servers
, Others
, and Web servers
. If you download a VM template from a remote repository and its category does not exist yet, the platform will create the new global category with this name.
The default global category is Others
and you cannot delete this category.
Administrators who can manage global categories can promote a local category to global. You cannot demote a global category to local or move local categories from one tenant to another.
To create a VM template category:
Go to Catalogue → Private or Public → select datacenter or public cloud region → Virtual machine templates
Check that there is no other category with the name you wish to use
Open the Categories menu
At the bottom of menu, click the + add button
Enter the category name
Optional: to create a global category, mark the checkbox to Make the category global
Click Save to continue
The new category will be added to the Categories list.
To add a VM template to a category:
Edit the template
Go to General
Select the category.
When you delete a category, all the templates belonging to this category will be changed to the category ''Others''.
Copy a VM template
To copy a VM template, move the mouse over the VM template in the Catalogue, and from the options button menu, select Duplicate.
Enter the name for the new template.
Select the disks you wish to copy and click Save.
Abiquo will create the duplicate as a new template in the Catalogue, with no links to the original template.
Introduction to mobility
The mobility feature enables users to export or move a template to private or public cloud. The original template must always be in the private cloud.
You can export:
multi-disk templates to other datacenters managed by Abiquo
single boot disks to public cloud regions in
AWS
Azure: You cannot upload more than one file with the same name in the same account and region. The file name is the unique part of the container name which is combined with the account name and region
To export to public cloud, you must first prepare the templates according to the cloud provider instructions.
See Preparing templates for export to public cloud
Export VM templates to datacenters and public cloud
Before you begin:
Check cloud providers. See Introduction to mobility above
Prepare templates for export to public cloud according to the cloud provider's instructions. See Preparing templates for export to public cloud
To export a template to a datacenter or public cloud
Go to Catalogue
Select the private cloud datacenter where the VM template is stored
Select the VM template and from its options menu, select Export
From the dialog, select Private or Public cloud.
For public cloud
select the public cloud provider and region
select one bootable system disk.
For private cloud
select the datacenter
select disks from the template to export.
Click Export
For private cloud, select the datacenter
For public cloud, select the public cloud region
For public cloud, select one bootable system disk. For private cloud, select disks
Export templates with the API
Using the API you can perform the export using the VirtualMachineTemplates Resource with the same method as is used for promoting an instance template. The datacenter repository should be the destination of the export and the request payload should contain a link to the VM template to export. See Abiquo API Reference
Delete a VM template
In a private cloud datacenter, to prevent users from working with a VM template, you can do the following
Replace template disk(s) with new disk(s), so future VMs use the new disk(s). To replace a disk, you can use the UI or API. See Manage VM templates and Appliance manager template API upload and download
Delete a template, which requires that no deployed VMs are using the template and it has no instances. Note that you can promote instances to main templates and then delete the instances
Make a template unavailable to users, when it is in use
To delete a shared template or make it unavailable, you must be logged in to the owner enterprise. If you make it unavailable, it will only be marked as unavailable for all users when the template owner performs a refresh of the Catalogue.
To remove a template that is not in use, from the template icon options menu, select Delete.
Abiquo will remove the template from the Catalogue and the NFS repository file system.
Make a template unavailable to users
If you want to prevent users from creating new VMs from a template, but it is in use (in VMs or for instances) so you cannot delete it, then you can make it unavailable. This means that the platform will remove the template disk files and you cannot recover them within the platform. A template wiill also become unavailable if one or more of its disk files is deleted from the NFS repository file system outside of the platform.
To make a template unavailable in the UI:
From the template icon options menu, select Delete. A confirmation dialog will open with details of the template use.
Confirm that you would like to force the delete. Abiquo will delete the disk files but not the template definition. The platform will mark this template as unavailable.
In the Catalogue, the platform will not display the unavailable template in the default view. To display the template again, click the filter button and mark the checkbox to display Deleted templates, which are unavailable templates with no disk files. The platform will mark the template icon with a red X symbol.
Make a template available again
If one or more template disk files are deleted from the NFS repository, the template will become unavailable. However, if you restore the disk file(s) to the filesystem, then the template will become available again. If the template was downloaded from a remote repository, you can download it again to restore it. After you restore a template, when users redeploy VMs, they will work with the new template and its conversions.
Delete Template Example
Here is a simple example of the process of deleting a template. An enterprise downloads a VM template from remote repository. A user deploys a VM from the template and modifies the VM. Then a user creates an instance from the deployed VM and deploys a new VM from the instance.
Manage instance templates in datacenters
An Abiquo instance is a template that uses copies of one or more disks from a VM. For information about how to create instances, see Save VM disks to create an instance template
In a datacenter, the platform stores an instance with the original main template. This means that you cannot delete a main template if it has instances. However, you can promote an instance to a main template.
The platform identifies main templates with the "M" symbol on the template icon and instances with the "S" symbol on the template icon.
To display the instances under a main template:
Click on the main template and the Instances panel will open with the instance templates.
You can modify the instance template, to change the CPU, RAM, icon, and so on, and these changes will not affect the main template.
Promote an instance to a main template
When you promote an instance, Abiquo first makes a copy of the instance and then promotes it to create a new main template. This is useful when you want to delete a main template but keep its instance template(s).
To promote an instance:
Select the original main template to display its instances
Select the instance, and from its options menu, select Promote
Enter a Name for the new main template. Select the disks to promote
Remember that there must always be at least one disk and that the disk at position 0 must be a boot disk.
The name should help users to identify this template among the other templates
The platform will display the completed template in the Catalogue view and you can edit it as required
Manage instances of deleted templates
You cannot delete a main template if it has VMs deployed or instances with VMs deployed, but you can make it unavailable, which deletes the template disk file. If a main template is unavailable, to display it and access the instances panel, select the checkbox to display Deleted VM templates. If you wish to create a VM from an instance of a deleted main template, first promote the instance to a main template.
Make an instance template unavailable
When you try to delete an instance that is in use in a VM (deployed or undeployed), the platform will only allow you to make it unavailable, which means that the platform will delete the disk file. Users cannot create or deploy VMs with an instance that is unavailable. After you confirm the delete, the platform will display a list of VMs using the template. Click Yes to force the delete of the instance disk file.
You cannot force the delete of an instance if it is in use in a VM.
If you try to delete an unavailable instance, an error popup will appear because the template is already unavailable.
To make the instance available again, replace the unavailable template files on the file system. When it detects the template files, the platform will mark the instance as available.
Delete failed instances
Failed instances may occur if there is a connection error between the platform and the VM disks. Failed instances are marked with the failed template icon.
To remove a failed instance template:
Select the template
From the options menu, select Delete
Manage instance templates in public cloud
When you create an instance template to save VM disks, the platform creates a custom template in the public cloud provider and adds its details to the Catalogue, which is a cache of template details.
In a public cloud region, the instance template is independent of the original main template. The platform saves the VM configuration as part of the custom template. To ensure that you can identify relationships between templates, name your instances carefully.
The platform will identify the public cloud image by the cloud provider's identifier. For example in AWS, an EBS image is identified by its AMI identifier. The name you assign to an instance may be stored in another format such as a tag.
The platform does not update templates in the public cloud provider so any changes that you make to templates in the platform will apply in the Catalogue only. For example, if you rename an instance template, this name will not apply in public cloud.
For details about deleting instance templates, see Delete private templates in public cloud below.
To find an Abiquo instance that was deleted from the Catalogue but not from the public cloud provider:
Go to Catalogue view, click on Import template
Select Private
To search for the template by the Name field, enter the name you gave your Abiquo instance template when you created it, or the Template ID
Click Search
Delete private templates in public cloud
In public cloud, to delete a private template (or custom template), such as an Abiquo instance:
From the template icon options menu, select delete
Optionally select the checkbox to Delete this template in the cloud provider
Confirm the delete
By default, the platform will delete the template from the Catalogue only and it will remain in the cloud provider.
If you delete the template in the cloud provider:
In AWS, when you delete a private AMI, it will also delete all the snapshots used by the AMI. If more than one AMI is using the same snapshot, AWS will delete the snapshot when you delete the last AMI.
In Azure, when you delete a private image, if the image was created from an image stored as a page blob, Azure will also delete the image.
In vCloud Director, when you delete an Abiquo private template, it will delete the vappTemplate that contains the template.
In OCI, it will delete the private image only.
In GCP, it will delete the private image only.
Other Pages related to VM template management
VM templates in the Catalogue
Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved