...
- The platform should be installed in a test environment, see Installation
- The platform should have a license added, on the License tab in Configuration view#Licenses
- You should have basic general knowledge of the Abiquo platform, see the Get Startedstarted section
- You should have worked with the Abiquo user interface, for example, by working through the Abiquo quick tutorial
- You should have API credentials and a chosen authentication method, see Authentication
- This tutorial uses the Cloud Administrator default account and does not show proper authentication
This tutorial corresponds to the UI information on the Compute in datacenters page.
Create a
...
datacenter
In this step you will create a new datacenter in a fresh install, sending a list of links to remote services.
...
Expand | ||
---|---|---|
| ||
|
Add a
...
rack
In Abiquo, hypervisors and container servers are organized in racks, in order to share the same network infrastructure and for high availability, for example.
To create a rack, you will need to make a POST request to the datacenter's racks link, which you can find in the response to the create datacenter request or from a GET to the datacenter link. In this example, we will use the racks link from the datacenter created above and a rack entity file. The rack entity is documented on the Abiquo Data Media Typesdata media types page, but you should also read the Compute in datacenters page in the User Manual, which provides more information about Abiquo racks. In particular, you should pay attention to the network parameters, which establish the VLAN tags that are available for Abiquo to use in the switch for Abiquo private networks. Even if you are using an SDN system, you will still need to define the tag range for Abiquo.
...
Expand | ||
---|---|---|
| ||
|
Add a
...
cloud node
A cloud node is the physical machine and hypervisor host or container server, for example.
Retrieve the machine list from a master hypervisor
Here we use a GET request to the "discover" link of the datacenter, but we need to supply the IP address of the manager host, and its credentials as parameters.
...
Expand | ||
---|---|---|
| ||
|
Retrieve a machine from a hypervisor address
Here we also use a GET request to the "discover" link of the datacenter, but we need to supply the IP address of the hypervisor host in addition to the master hypervisor address and credentials.
...
Expand | ||
---|---|---|
| ||
|
Retrieve a KVM machine
And if you're doing a test, maybe you're just using a KVM, in which case you should use the following cURL, modifying the appropriate parameters.
Code Block |
---|
GET https://example.com/api/admin/datacenters/3/action/discover?hypervisor=KVM&ip=mjskvm.bcn.abiquo.com -H 'Accept:application/vnd.abiquo.machines+json;version=4.6' \ -d @requestpayload.json \ -u user:password --verbose |
Modify the
...
machine details
To create a machine in Abiquo, you will need to modify the response object from the previous discovery request.
Generally, you will need to obtain a single machine object, enable datastores and add a network service type.
Retrieve
...
network service type
A network service type is a tag for your networks to associate them with hypervisor NICs. By default, there is a "Service Network" type. Typically, the default Service Network type is created for each datacenter, and if you haven't created any extra network service types in your environment, the ID number of the network service type will be the same as the datacenter.
...
You will need the link with the "rel" value of "edit" to create the network service type link for the host NIC.
Modify the
...
machines DTO
Here we will walk through some basic changes to the response object from the previous machine discovery step
...
The final machine entity is shown in the following step where it is used to create the physical machine.
Create the
...
physical machine
To add a physical machine, use the machine object you retrieved earlier and modified in the previous step. Perform a POST request to the link with a "rel" value of "machines" from the rack object you created earlier. This will add the physical machine to the platform and its state should be "managed". When you need to check its state, perform a GET request to the "checkstate" link.
...
Expand | ||
---|---|---|
| ||
|
Retrieve guests running on the host
In the user interface, you can check a box to Retrieve existing virtual machines when you create a physical machine. This means that the platform will take the guests you retrieve into consideration (for example, for scheduling and statistics), even though they are not managed by Abiquo unless you explicitly capture them. Here's how to retrieve the virtual machines in the API. First, you need to add the host, as described above. Then perform a GET request to the link with a "rel" value of "virtualmachines" and with the parameter "sync" set to "true".
...