Managing Reservations
Crusoe Cloud is currently in private beta. If you do not currently have access, please request access to continue.
Create a new reservation
To create a new reservation, please reach out to Crusoe Cloud sales.
List reservations in your organization
- CLI
- UI
crusoe reservations list
To view all reservations in your organization:
- Visit the Crusoe Cloud console
- Click the "Usage" tab in the left nav
- Select the "Reservations" pill in the top nav
- All of the your reservations applicable to your organization will be visible. You can also click into any reservation to view additional details
Automatically place a VM in the lowest cost reservation
This is the default behavior for VMs provisioned in an organization with applicable reservations. If no reservation ID or reservation strategy is specified, we will default to 'lowest-cost'.
- CLI
- UI
- Terraform
crusoe compute vms create \
--name my-vm \
--type l40s-48gb.10x \
--location us-east1-a \
--image ubuntu22.04:latest \
--keyfile ~/.ssh/id_ed25519.pub
--reservation-strategy "lowest-cost"
To have a VM placed in the lowest cost reservation:
- Visit the Crusoe Cloud console
- Click the "Compute" tab in the left nav
- Click the "Instances" tab on the top bar
- Click on the "Create Instance" button on the top-right
- Select the type of instance you want to provision, while filling out other required fields
- Select 'Use lowest cost reservation if available' in the Reservation Selection section
- Fill out the other fields required to provision a VM and complete provisioning. The VM will be placed in the lowest cost reservation.
By default, not explicitly specifying a reservation when describing a VM in Terraform will result in the VM being provisioned in the lowest cost reservation available:
// Crusoe Provider
terraform {
required_providers {
crusoe = {
source = "registry.terraform.io/crusoecloud/crusoe"
}
}
}
// local files
locals {
ssh_key = file("~/.ssh/id_ed25519.pub") # replace with path to your public SSH key if different
}
// new VM
resource "crusoe_compute_instance" "my_vm" {
name = "my-vm"
type = "l40s-48gb.10x"
location = "us-east1-a"
image = "ubuntu22.04:latest" # use the 'latest' flag to get the most up to date image available from Crusoe
ssh_key = local.ssh_key
}
Associate VMs to a specific reservation
- CLI
- UI
- Terraform
crusoe compute vms create \
--name my-vm \
--type l40s-48gb.10x \
--location us-east1-a \
--image ubuntu22.04:latest \
--keyfile ~/.ssh/id_ed25519.pub
--reservation-id 5fdc4455-c5f1-426a-8acb-1b954f6dac09
To select a specific reservation for a VM:
- Visit the Crusoe Cloud console
- Click the "Compute" tab in the left nav
- Click the "Instances" tab on the top bar
- Click on the "Create Instance" button on the top-right
- Select the type of instance you want to provision, while filling out other required fields
- Select 'Choose specific reservation' in the Reservation Selection section, and pick the reservation you want to use
- Fill out the other fields required to provision a VM and complete provisioning. The VM will be placed in the selected reservation.
// Crusoe Provider
terraform {
required_providers {
crusoe = {
source = "registry.terraform.io/crusoecloud/crusoe"
}
}
}
// local files
locals {
ssh_key = file("~/.ssh/id_ed25519.pub") # replace with path to your public SSH key if different
}
// new VM
resource "crusoe_compute_instance" "my_vm" {
name = "my-vm"
type = "l40s-48gb.10x"
location = "us-east1-a"
image = "ubuntu22.04:latest" # use the 'latest' flag to get the most up to date image available from Crusoe
reservation_id = "5fdc4455-c5f1-426a-8acb-1b954f6dac09"
ssh_key = local.ssh_key
}
Explicitly provision a VM as on-demand
- CLI
- UI
- Terraform
crusoe compute vms create \
--name my-vm \
--type l40s-48gb.10x \
--location us-east1-a \
--image ubuntu22.04:latest \
--keyfile ~/.ssh/id_ed25519.pub
--reservation-strategy on_demand
To provision a VM as on-demand through the console:
- Visit the Crusoe Cloud console
- Click the "Compute" tab in the left nav
- Click the "Instances" tab on the top bar
- Click on the "Create Instance" button on the top-right
- Select the type of instance you want to provision, while filling out other required fields
- Select 'Provision as on-demand' in the Reservation Selection section
- Fill out the other fields required to provision a VM and complete provisioning. The VM will be provisioned as on-demand
Explicitly passing in an empty string to the 'reservation_id' field will result in the VM being provisioned as on-demand.
// Crusoe Provider
terraform {
required_providers {
crusoe = {
source = "registry.terraform.io/crusoecloud/crusoe"
}
}
}
// local files
locals {
ssh_key = file("~/.ssh/id_ed25519.pub") # replace with path to your public SSH key if different
}
// new VM
resource "crusoe_compute_instance" "my_vm" {
name = "my-vm"
type = "l40s-48gb.10x"
location = "us-east1-a"
image = "ubuntu22.04:latest" # use the 'latest' flag to get the most up to date image available from Crusoe
reservation_id = ""
ssh_key = local.ssh_key
}
Update a VM to place into a reservation
- CLI
- UI
- Terraform
crusoe compute vms update \
--reservation-id 5fdc4455-c5f1-426a-8acb-1b954f6dac09
To add a provisioned VM to a reservation:
- Visit the Crusoe Cloud console
- Click the "Compute" tab in the left nav
- Click the "Instances" tab on the top bar
- Select the instance you want to add to a reservation
- Click the "Add to Reservation" button on the bottom right in the "Reservation" tile
- Choose an available reservation from the dropdown in the modal and confirm your action
- The VM will be added to the reservation, with any usage from that point covered by the terms of your reserved instance agreement
Similar to targeting a reservation when creating a VM, adding in a 'reservation_id' field associated with your "crusoe_compute_instance" resources in Terraform will update existing VMs and add them into a reservation. If your VM is already in a reservation, updating this field will also move the VM to the newly supplied reservation.
Remove a reservation from a VM
- CLI
- UI
- Terraform
crusoe compute vms update \
--reservation-id ""
To remove a reservation from a VM:
- Visit the Crusoe Cloud console
- Click the "Compute" tab in the left nav
- Click the "Instances" tab on the top bar
- Select the instance you want to remove the reservation from
- Click the "Remove from Reservation" button on the bottom right in the "Reservation" tile
- The VM will be removed from the reservaton. Any further usage will be billed on-demand
Similar to provisioning a VM as on-demand, passing in an empty string "" into the 'reservation_id' field associated with your "crusoe_compute_instance" resources in Terraform will update existing VMs and add them into a reservation.