...
Get all virtual datacenters
Tip |
---|
API Documentation For the Abiquo API documentation of this feature, see Abiquo API Resources and the page for this resource VirtualDatacenterResource. |
...
Optionally create a virtual appliance
Tip | ||
---|---|---|
API Documentation For the Abiquo API documentation of this feature, see Abiquo API Resources and the page for this resource VirtualApplianceResource. | ||
Div | ||
|
API roles required:
CREATE a virtual appliance
Code Block |
---|
* This action requires the privilege VDC_MANAGE_VAPP
|
cURL:
Code Block |
---|
curl -X POST https://example.com/api/cloud/virtualdatacenters/490/virtualappliances \
-H 'Accept:application/vnd.abiquo.virtualappliance+json; version=4.2' \
-H 'Content-Type:application/vnd.abiquo.virtualappliance+json; version=4.2' \
-d @requestpayload.xml \
-u user:password --verbose |
Success status code: 201
Request payload:
Code Block |
---|
{
"name":"vapp_vdc_m01j_001",
"iconUrl":"https://upload.wikimedia.org/wikipedia/commons/a/af/Tux.png"
} |
Response payload:
Code Block |
---|
{
"id":836,
"error":0,
"highDisponibility":0,
"name":"vapp_vdc_m01j_001",
"publicApp":0,
"state":"NOT_DEPLOYED",
"iconUrl":"https://upload.wikimedia.org/wikipedia/commons/a/af/Tux.png",
"notAllocatedVirtualMachines":0,
"onVirtualMachines":0,
"offVirtualMachines":0,
"pausedVirtualMachines":0,
"allocatedVirtualMachines":0,
"configuredVirtualMachines":0,
"unknownVirtualMachines":0,
"lockedVirtualMachines":0,
"links":[
{
"title":"vapp_vdc_m01j_001",
"rel":"edit",
"type":"application/vnd.abiquo.virtualappliance+json",
"href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836"
},
{
"title":"vdc_m01j",
"rel":"virtualdatacenter",
"type":"application/vnd.abiquo.virtualdatacenter+json",
"href":"https://example.com:443/api/cloud/virtualdatacenters/490"
},
{
"title":"AWS_enterprise_forBilling",
"rel":"enterprise",
"type":"application/vnd.abiquo.enterprise+json",
"href":"https://example.com:443/api/admin/enterprises/65"
},
{
"title":"virtual machines",
"rel":"virtualmachines",
"type":"application/vnd.abiquo.virtualmachines+json",
"href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/virtualmachines"
},
{
"title":"virtual appliances state",
"rel":"state",
"type":"application/vnd.abiquo.virtualappliancestate+json",
"href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/state"
},
{
"title":"undeploy",
"rel":"undeploy",
"type":"application/vnd.abiquo.acceptedrequest+json",
"href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/action/undeploy"
},
{
"title":"deploy",
"rel":"deploy",
"type":"application/vnd.abiquo.acceptedrequest+json",
"href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/action/deploy"
},
{
"title":"price",
"rel":"price",
"type":"text/plain",
"href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/action/price"
},
{
"title":"layers",
"rel":"layers",
"type":"application/vnd.abiquo.layers+json",
"href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/layers"
},
{
"title":"alerts",
"rel":"alerts",
"type":"application/vnd.abiquo.alerts+json",
"href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/alerts"
},
{
"title":"spec",
"rel":"spec",
"type":"application/vnd.abiquo.virtualappliancespec+json",
"href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/action/spec"
},
{
"title":"tasks",
"rel":"tasks",
"type":"application/vnd.abiquo.tasks+json",
"href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/tasks"
},
{
"title":"scalinggroups",
"rel":"scalinggroups",
"type":"application/vnd.abiquo.scalinggroups+json",
"href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/scalinggroups"
},
{
"title":"metricsmetadata",
"rel":"metricsmetadata",
"type":"application/vnd.abiquo.metricsmetadata+json",
"href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/metrics"
},
{
"title":"collectd",
"rel":"collectd",
"type":"application/json",
"href":"https://example.com:443/api/cloud/virtualdatacenters/490/virtualappliances/836/metrics/collectd"
}
]
} |
Next we can determine which templates are available to deploy in our 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.
Tip |
---|
API Documentation For the Abiquo API documentation of this feature, see Abiquo API Resources and the page for this resource VirtualMachineTemplateResource. |
...
So we will send a POST request with the VM object to the virtual machines link of the virtual appliance. Remember that until we deploy, the VM only exists in Abiquo – we haven't launched the VM in AWS yet.
Tip |
---|
API Documentation For the Abiquo API documentation of this feature, see Abiquo API Resources and the page for this resource VirtualMachineResource. |
...
Then we can either deploy the virtual machine VM or the virtual appliance using the links in the corresponding entity. For example, in from the virtual machine above VM, the deploy link is:
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 |
---|
API Documentation For the Abiquo API documentation of this feature, see Abiquo API Resources and the pages for this resource VirtualMachineResource and VirtualApplianceResource. |
...