Table of Contents |
---|
1. Introduction
This document describes how to upload and replace existing template disks using the Appliance manager API.
...
Get the template details from the Abiquo API
Create the replacement data object
Replace the file using the Appliance manager API
...
...
2. Initial steps and requirements
Before you begin:
Make a backup of your template folder
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 If your template uses a different controller type and value, such as 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
.
...