...
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
Sample JSON template
Code Block |
---|
{ "name":"a new template", "description":"this is a test", "categoryName":"simpaticos", "diskFileFormat":"VMDK_FLAT", "requiredCpu":1, "requiredHDInMB":2, "requiredRamInMB":256 } |
...
In the returned 'Location' header there is a link to reference the template that was created.
...
Check the upload
Get the metadata:
Code Block |
---|
$ curl --verbose -uadmin:xabiquo -X GET "http://10.60.1.223/am/erepos/1/templates/1/10.60.1.223/1fc06416-6696-4b55-9d7c-d58bc51aaf5a/disk.vmdk" |
...
Code Block |
---|
$ curl --verbose -uadmin:xabiquo -X GET "http://10.60.1.223/am/files/1/10.60.1.223/1fc06416-6696-4b55-9d7c-d58bc51aaf5a/disk.vmdk" |
...
Identify your template in the API
The relative path (1/10.60.1.223/1fc06416-6696-4b55-9d7c-d58bc51aaf5a/disk.vmdk) should be used to identify the virtual machine template you created in the abiquo API
...