Versions Compared

Key

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

...

Note
  • This request requires direct access to the Appliance Manager API

  • Make a backup of your template folder before you begin

Warning

If you are replacing a disk that was created from an instance of a captured VM, add an Abiquo OVF file to the original VM template folder before you upload your new disk. You may be able to copy a file from another template and modify it for your template.

Warning

The Appliance Manager API does not validate the request, so be sure to provide the correct path to your disk file or you could overwrite some other part of your file system!!

...

  1. Upload or download a template

  2. Use it to create a VM 

  3. Update the template.  Abiquo supports changes to:

    1. file content

    2. size

    3. format

    4. capacity

    5. controller

    Update the disk using the Appliance manager API.

  4. When the user next deploys the VM, the platform will copy the updated disk

Basic steps

  1. Get the template details from the Abiquo API

  2. Create the replacement data object

  3. Replace the file using the Appliance manager API

...

  1. deploys the VM, the platform will copy the updated disk

...

Basic steps

  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.

...