Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updating numbered headings
Table of Contents

 

1. Introduction 

This document describes how to upload and replace existing template disks using the Appliance manager API.

...

  1. Get the template details from the Abiquo API

  2. Create the replacement data object

  3. Replace the file using the Appliance manager API

...

...

2. Initial steps and requirements

Before you begin:

  1. Make a backup of your template folder

  2. If you are replacing a disk that was created from an instance of a captured VM, you must add an Abiquo OVF file to the original VM template folder.
    If you have a similar template created from an uploaded OVA file, you may be able to copy the OVF file and modify it for your template.

...

...

3. Log in to the API and obtain a token

If you wish to use token authentication, which is more secure and required for 2FA, do these steps.

...

Tip

You can also get the token from the UI! Go to the browser Developer console on the Network tab and in the request responses look for the X-Abiquo-Token header.

...


4. Get the template details

Get the enterprise, for example, by using the has parameter to filter by a text string in the enterprise names from the list enterprises request.

...


You will need the href and the path for the replacement object!

...

5. Create the replacement object

From the above response, we need

...

Note

The default value for the diskControllerType is IDE and the default value for the diskController is NULL.

If your template uses a different controller type and value, such as SCSI and lsilogic, you must add these values in the diskReplace.json entity, as shown above. If you do not add them, the platform will overwrite your template with its default values.

You should note that the AM API does not support all of the values that are supported by the Abiquo API.

...


...


6. Obtain the URLs to replace the file

Obtain the URLs to build the request to replace the disk.

...

Code Block
curl -v -k -X POST "https://remoteservices.example.com:443/am/erepos/1/templates/1/bundle/abc%2520abc"

...

7. Replace the disk

This request is to the Appliance Manager remote service, so we need to use its URL.

...

Success status code: 201 Created

...

8. Check the disk file

You can check the disk file in Abiquo UI, which will display the path and file size.

...