...
This simple walkthrough shows how to deploy in a scenario in AWS where a virtual datacenter and a template exist for the public cloud region. The user role in this example is a plain user. The privileges needed are displayed for every query.
Privileges
...
required
...
Then we will retrieve the enterprise, in order to access the repository and the virtual machine template s for the hypervisor of the virtual datacenter. To create the new virtual machine, we will take the virtual appliance and add the templates for the new virtual machine s.
Get all
...
virtual datacenters
Tip | ||
---|---|---|
| ||
For the Abiquo API documentation of this feature, see Abiquo API Resources and the page for this resource VirtualDatacenterResource. |
API Roles roles required
Code Block | ||
---|---|---|
| ||
* This action requires the privileges AUTHENTICATED, VDC_ENUMERATE |
...
Div | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
API Roles roles required:
cURL:
Success status code: 201 Request payload:
Response payload:
|
...
Next we can determine which templates are available to deploy in our virtual datacenter.
Get
...
templates available to the
...
virtual datacenter
Get all the templates from the repository that are compatible with your virtual datacenter. In this example we only show one virtual machine template.
...
Expand | ||
---|---|---|
| ||
|
Create the
...
virtual machine
Now we will create the virtual machine. To do this, you will need:
...
Code Block |
---|
{ "title": "virtual machine deploy", "rel": "deploy", "type": "application/vnd.abiquo.acceptedrequest+json", "href": "https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/virtualmachines/6376/action/deploy" }, |
Deploy a
...
virtual machine
Tip | ||
---|---|---|
| ||
For the Abiquo API documentation of this feature, see Abiquo API Resources and the pages for this resource VirtualMachineResource and VirtualApplianceResource. |
...
Code Block |
---|
{ "message": "You can keep track of the progress in the link", "links": [ { "rel": "status", "href": "https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/virtualmachines/6376/tasks/8ceb8256-6599-45f2-8989-e2d8e507c41a" } ] } |
Undeploy a
...
virtual machine
And undeploy:
Code Block | ||
---|---|---|
| ||
* This action requires the privilege VAPP_DEPLOY_UNDEPLOY curl -X POST http://example.com:9000/api/cloud/virtualdatacenters/490/virtualappliances/836/virtualmachines/6376/action/undeploy \ -H 'Accept:application/vnd.abiquo.acceptedrequest+json; version=4.2' \ -H 'Content-Type:application/vnd.abiquo.virtualmachinetask+json; version=4.2' \ -d @requestpayload.json \ -u user:password --verbose |
...
Code Block | ||
---|---|---|
| ||
{ "message": "You can keep track of the progress in the link", "links": [ { "rel": "status", "href": "https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/virtualmachines/6376/tasks/cec70487-6d29-4fde-b6ef-e3488f5fe239" } ] } |
Check
...
progress
We can query the progress using:
...