Working with VM templates in the API

In Abiquo, users can download templates from remote template repositories. A remote template repository exposes a list of the templates it contains. Effectively it is an HTML file (ovfindex.html) and a collection of templates.

A remote template repository is indexed by a template definition list in the Abiquo API.

Creating template definition lists

When you download a template definition to the datacenter, a virtual machine template is created, which means, for example, that the virtual machine system disk will stored in the Apps library (NFS repository).

Creating a template definition list from template definitions

  1. Create an empty template definition list

  2. To include a template definition in the list:

    1. Edit the template definition to add the template definition list link

    2. Perform a PUT on the template definition

Modifying template definitions

The PUT on a template definition is only designed for creating template definition lists. A template definition is created in Abiquo to provide users with information about the templates they have access to. When users select a template to add to their Apps Library, that template will be downloaded using the links to the template components. This means that changes to the values stored for the template in Abiquo are not made to the template in the remote template repository. 

API template download

You can simulate a download from a remote repository to the appliance library by exposing a template disk via HTTP. 

The post to create a virtual machine template definition takes a link to an OVF file. The API will retrieve this OVF file and download the associated files (disk file, icon).

Create a template from a template definition

https://wiki.abiquo.com/api/latest/VirtualMachineTemplatesResource.html#create-a-virtual-machine-template-in-a-datacenter-repository-by-downloading-a-template-definition

Promote an instance or duplicate a template or export a template

https://wiki.abiquo.com/api/latest/VirtualMachineTemplatesResource.html#create-a-virtual-machine-template-in-a-datacenter-repository-by-download-promote-or-export

Basic template modifications

For example to change the name of a template.

https://wiki.abiquo.com/api/latest/VirtualMachineTemplatesResource.html#update-a-virtual-machine-template

Upload an OVA file

OVA Upload

Upload a disk to a template or replace a disk

Appliance manager template API upload and download

Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved