VM Images Overview
Create Custom Images
- CLI
- UI
Use the compute images create to create a custom image:
crusoe compute images create --name <image-name> --vm-name <vm-name> --tags <tag1,tag2> --description <description> --project-name <project-name>
In order to create a new custom image via the Crusoe Cloud console:
- Visit the Crusoe Cloud console
- Select "Compute" > "Instances" in the left nav
- Select the instance from which you would like to create a custom image (ensure it is powered off to create a custom image)
- Select "Create a custom image"
- Enter the Custom Image name, description and tags and click on the Create button
Custom Image can also be created using the following workflow:
- Visit the Crusoe Cloud console
- Select "Compute" > "Custom Images" in the left nav
- Select "Create Custom Image"
- Enter a name and description, and select your source VM
- If you do not see the VM from which you intend to create a custom image, please power it off and retry the operation.
The Create Custom Image workflow can take a few minutes to complete and the time taken depends on the used capacity of the source VM OS disk. Do not turn the source VM off while it is being created.
Listing Images
- CLI
- UI
- Terraform
Use the compute images list to list all images:
crusoe compute images list
In order to only view Custom Images in Crusoe Cloud Console:
- Visit the Crusoe Cloud console
- Select "Compute" > "Custom Images" in the left nav
# Data source to get all custom images
data "crusoe_compute_custom_image" "clean_list_images" {
}
output "custom_image_list" {
value = data.crusoe_compute_custom_image.clean_list_images.custom_images
}
Using Images
- CLI
- UI
- Terraform
Use the compute vms create command, passing an image flag with the chosen curated image or passing a --custom-image flag with the chosen custom image:
crusoe compute vms create \
--image ubuntu:22.04 \
...
crusoe compute vms create \
--custom-image my-custom-image \
...
In order to use a VM image in the Crusoe Cloud console:
- Visit the Crusoe Cloud console
- Select "Compute" > "Instances" in the left nav
- Click "Create Instance"
- To create an instance with a curated image, select "Default" on Instance Options
- To create an instance with a custom image, select "Custom" on the Instance Options
- Use the "Select an image" and "Select an image version" dropdowns to select an image and version
- Continue with the remainder of the "Create Instance" flow
# Create the VM using the custom image
resource "crusoe_compute_instance" "my_vm_with_custom_image" {
name = "my-vm"
location = "us-east1-a"
type = "c1a.2x"
custom_image = "my-custom-image" # Use custom_image parameter with image name
ssh_key = file("~/.ssh/id_ed25519.pub")
}
Update Custom Images
- CLI
- UI
Use the compute images update command, passing an description flag to update the description:
crusoe compute images update <vm-name>\
--description my-new-description \
...
Use the compute images add-tags command, passing an tags flag to add tags to the custom image:
crusoe compute images add-tags <vm-name>\
--tags my-new-tag1,my-new-tag2 \
...
Use the compute images delete-tags command, passing an tags flag to delete tags from the custom image:
crusoe compute images delete-tags <vm-name>\
--tags my-tags-to-delete1,my-tags-to-delete2 \
...
In order to update a Custom image in the Crusoe Cloud console:
- Visit the Crusoe Cloud console
- Select "Compute" > "Custom Images" in the left nav
- Navigate to the Custom Image you wish to edit
- Click the edit icon for that image
- Edit the tags and description as necessary
- Click on the update button to apply the changes
Delete Custom Images
- CLI
- UI
Use the compute images delete command:
crusoe compute images delete <my-custom-image>
In order to delete a custom image in the Crusoe Cloud console:
- Visit the Crusoe Cloud console
- Select "Compute" > "Custom Images" in the left nav
- Navigate to the Custom Image you wish to delete
- Click the deletion icon in the row for that image
- Input the name of the custom image in the input box and click "Confirm"