Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Abiquo uploads templates using the Appliance Manager (AM) Remote Service. To enable API template upload, Abiquo exposes a resource from the private AM API. The authentication for the use of this resource is performed through the Abiquo API.

This section describes how to upload:

  • a standard template to the Appliance Manager using the Appliance Manager API

  • an OVA file to the Appliance Manager using the Appliance Manager API

...

Template files

To upload a standard template you will need:

  • diskFile

    • one virtual machine disk file, e.g. .vmdk file

  • diskInfo

    • JSON or XML representation of the template metadata

To upload an OVA file you will need:

  • diskFile

    • OVA format with a filename extension of ".ova"

    • can contain multiple disks

    • no need to provide template metadata, e.g. disk capacity, because this is in the OVF descriptor file

...

Preparatory steps

Step 1. Retrieve the appliance manager base URI

Code Block
curl -X GET https://myabiquo/api/admin/datacenters/1/remoteservices

Code Block
   {
      "id": 3, 
      "links": [
        {
          "href": "https://myabiquo:443/api/admin/remoteservices/3", 
          "rel": "edit", 
          "title": "APPLIANCEMANAGER", 
          "type": "application/vnd.abiquo.remoteservice+json"
        }, 
        {
          "href": "https://myabiquo:443/api/admin/remoteservices/3/action/check", 
          "rel": "check", 
          "title": "check", 
          "type": ""
        }, 
        {
          "href": "https://myabiquo:443/api/admin/datacenters/1", 
          "rel": "datacenter", 
          "title": "BCDC", 
          "type": "application/vnd.abiquo.datacenter+json"
        }
      ], 
      "status": 1, 
      "type": "APPLIANCE_MANAGER", 
      "uri": "https://myabiquo:443/am", 
      "uuid": "Abiquo"
    }, 

...

Step 2. For a standard template, specify the template meta-data in JSON or XML

...

Code Block
<template>
    <name>theDiskName</name>
    <description>theDiskDescription</description>
    <categoryName>Test others</categoryName>    
    <diskFileFormat>VHD_FLAT</diskFileFormat>
    <requiredCpu>1</requiredCpu>
    <requiredRamInMB>512</requiredRamInMB>
    <requiredHDInMB>10</requiredHDInMB>
    <!-- optional attributes -->
    <iconUrl />
    <loginPassword />
    <loginUser />
    <diskControllerType />
    <ethernetDriverType />
    <osType />
    <osVersion />    
</template>

Tip

TIP: use qemu-img to determine the diskFileFormat and requiredHDInMB (=capacity for compressed formats)

...

Upload standard template example

...

The following example shows how to upload an OVA file, which may have multiple VM disk files. Include  Include the template and disk details in the OVF descriptor file inside the OVA. Do Do not supply a diskInfo file for the template because this information is included in the OVA file. Supply  Supply the OVA file with the filename extension of of ".ova". 

Use the same link as for standard template upload.

...