Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

If you are replacing a disk that was created from an instance of a captured VM, add an Abiquo OVF file for to the original VM template folder before you upload your new disk. You can copy an OVF file from another Abiquo template created with the same disk and update the details of the disk of your template.In Abiquo the OVF file should have a product section, see OVF reference

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!!

...

Code Block
/am/erepos/1/templates/1/bundle/e05785d2-b49a-4034-9bb9-3440e1693589-4ba3b6e1-6f06-47d9-8703-9e9
Tip

The template path does not contain the ID of the datacenter repository. It contains the folder name from /opt/vm_repository.
So in our example, the datacenter repository ID is 1 and the path is "1/bundle.." but they are not related

Use this information to build the request to replace the disk.

If your folder name contains spaces, encode the section of the name that contains spaces for the URL. For example, for a disk with "abc abc" in the name, you should encode this part of the URL “abc%20abc” to give:

abc%2520abc

With this encoding, the server will correctly read the URL as "abc%20abc".

If you use the request without encoding, it may destroy your original disk file
Note
Warning

If your file or folder name contains spaces or other encoded characters, encode them twice.
For example, for a disk or folder with "abc abc" in the name, the URL will have abc%20abc to represent this.
For the URL for the POST request, you will need to encode this section again, to give abc%2520abc.
The server will then correctly read this as abc%20abc.

Info

If the original disk file is not available, you can create a placeholder file in the folder using the touch command, in the format touch {currentPath}. For example:
touch 1/bundle/e05785d2-b49a-4034-9bb9-3440e1693589-4ba3b6e1-6f06-47d9-8703-9e9/4ba3b6e1-6f06-47d9-8703-9e9eae1c2a9b-snapshot-yVM2b8c91aa4-14b1-44a6-b27b-aa12c7ca3433-flat.vmdk

Tip

The template path does not contain the ID of the datacenter repository. It contains the folder name from /opt/vm_repository.
So in our example, the datacenter repository ID is 1 and the path is "1/bundle.." but they are not related

You will use this information to build the request to replace the disk.

cURL

In the following cURL, the base_url is the URL of the Abiquo API server, without the /api path. For example, https://abiquo.example.com.

...