...
Code Block | ||
---|---|---|
| ||
{ "virtualMachineTemplateUrl":"{base_api_url}/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/72", "diskUrl":"{base_api_url}/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/72/disks/74", "currentPath":"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", "diskControllerType": "IDE", "diskFileFormat":"VMDK_STREAM_OPTIMIZED", "label": "Hard disk 1", "requiredHDInMB":120, "sequence":0 } |
Example request:
We recommend that you use quotation marks around the file parameters for diskInfo and diskFile.
Code Block |
---|
curl -v -k -X POST 'https://abiquo.example.com:443/am/erepos/1/templates/1/bundle/e05785d2-b49a-4034-9bb9-3440e1693589-4ba3b6e1-6f06-47d9-8703-9e9' \ -H 'Authorization: Token {api_token}' \ -F "diskInfo=@diskReplace.json" -F "diskFile=@newdisk.vmdk" > POST /am/erepos/1/templates/1/bundle/e05785d2-b49a-4034-9bb9-3440e1693589-4ba3b6e1-6f06-47d9-8703-9e9 HTTP/1.1 > Host: abiquo.example.com > User-Agent: curl/7.85.0 > Accept: */* > Authorization: Token a2e19816735381c1d074441cbd002aa006febf2c4888bc2d79b9d2dfbcd9cbed84cbb0089197da8f0406f7a78ae2b25a64df188f10233541e5c45639b013b0c0 > Content-Length: 118752233 > Content-Type: multipart/form-data; boundary=------------------------bb8e15ec8adeba87 > Expect: 100-continue > < HTTP/1.1 100 Continue < HTTP/1.1 201 < Date: Wed, 25 Jan 2023 14:44:47 GMT < Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips < Location: https://abiquo.example.com/am/erepos/1/templates/1/bundle/e05785d2-b49a-4034-9bb9-3440e1693589-4ba3b6e1-6f06-47d9-8703-9e9/8611a4ed-adbd-49aa-a22e-81fd4b60e833-newdisk.vmdk < Content-Length: 0 < |
Success status code: 201 Created
...
6. Check the disk file
You can check the disk file in Abiquo UI, which will display the path and file size.
...