Reserved Servers¶
If you have requested a server and your request is fulfilled, you will have access to that specific server for the duration of the reservation.
Provisioning From Your Reserved Servers¶
To deploy a reserved server in your Project, select Bare Metal Servers > Deploy. Under Select instance type choose Deploy Reserved Servers.
Select the server from the Reservations drop-down menu. Select its Operating System, and give it a Hostname.
Click Configure to customize the deployment further, including:
- configuring the IP addresses
- user data
- SSH keys
- tags
- custom data
Click Apply Changes to save your configuration.
To provision more than one server, click + and repeat the process.
When you have chosen and configured all the servers you want to deploy, click Deploy Now.
To list hardware reservations, send a GET
request to the /projects/{id}/hardware-reservations
endpoint.
curl -X GET -H 'X-Auth-Token: <API_TOKEN>' \
"https://api.equinix.com/metal/v1/projects/{id}/hardware-reservations"
To see the details of a single reservation, you can send a GET
to /hardware-reservations/{id}
.
curl -X GET -H 'X-Auth-Token: <API_TOKEN>' \
"https://api.equinix.com/metal/v1/hardware-reservations/{id}"
To create a device from a specific hardware reservation, send a POST
request to the projects/<id>/devices
endpoint, just as if you were provisioning an on-demand server, but specify the hardware_reservation_id
, hostname
, and operating_system
that you want to provision in the body of the request.
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Auth-Token: <API_TOKEN>" \
"https://api.equinix.com/metal/v1/projects/{id}/devices" \
-d '{
"hardware_reservation_id":"reservation_id",
"hostname": "your-hostname",
"operating_system": "ubuntu_20_04_image"
}'
If you have multiple reservations, you can provision the next available reserved server by sending in "next-available"
instead of a reservation ID. When using "next-available"
, you need to also specify the metro of the reservation.
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Auth-Token: <API_TOKEN>" \
"https://api.equinix.com/metal/v1/projects/{id}/devices" \
-d '{
"hardware_reservation_id":"next-available",
"hostname": "your-hostname",
"operating_system": "ubuntu_20_04_image",
"metro": "sv"
}'
Moving Reserved Servers Between Projects¶
Reserved Servers can be moved between Projects within the same Organization.
Managing hardware reservations between projects within the same organization can be done from the Equinix Metal console in Organization Settings on the Reserved Hardware tab. To move a hardware reservation to a different project, click the overflow menu (the three dots) and click Assign to project.
You can then select the project to move the reservation to from the drop-down field, click Assign, and the reservation will be moved to the new project.
To move to a reservation in the API, you will need the reservation ID and the Project ID that you are moving the reservation to. Then, send a POST
to /hardware-reservations/{id}/move
with the reservation ID in the path, and the project ID in the body of the request.
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Auth-Token: <API_TOKEN>" \
"https://api.equinix.com/metal/v1/hardware-reservations/{id}/move" \
-d '{
"project_id": "new-project-id"
}'