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-2022, Abiquo Holdings SL. All rights reserved