Introduction
~~This Feature will be available very soon~~
This article will explain how to manage VM images within the Crusoe Cloud platform, covering creation, listing, usage, updating, and deletion of custom images through the CLI and UI. Users will find precise instructions for both command-line and console operations, particularly for generating and deploying custom VM images.
What are custom images?
Custom images are customer-managed, modified versions of curated images. Once customers have created a virtual machine (VM) from a base image and customized it with preferred configurations and software, they can stop the VM and create a custom image from its boot disk.
When creating subsequent VMs within their project, customers can select their newly created custom image as the base image. Unlike curated images, custom images are region and project specific and cannot be shared outside the project or the specific region it was created in.
Custom images can only be created from the boot disks of a VM. Like curated images, custom images support tags with the default tag
being latest
.
For a list of curated images, please refer to this article here: https://docs.crusoecloud.com/compute/images/overview#list-of-curated-images
Custom Image maintenance
Customers are solely responsible for the maintenance of their custom images. Crusoe does not update, manage or modify those images in any way. Deleting the source VM used to create the custom image is allowed and will not affect the custom Image itself.
Please remove any local disk mount entries from the /etc/fstab file on the VM before creating a custom image in order to prevent boot failures for subsequent VMs.
Prerequisite
- Crusoe Cloud account
- Access to the Crusoe Cloud UI or Crusoe CLI
~ Create Custom Images ~
CLI:
crusoe compute images create --name <image-name> --vm-name <vm-name> --tags <tag1,tag2> --description <description> --project-name <project-name>
UI:
In order to create a new custom image via the Crusoe Cloud console:
- Visit the Crusoe Cloud Console
- Click the "Compute" tab in the left nav
- Click the "Instances" tab on the top bar
- Select the instance from which you would like to create a custom image (ensure it is powered off to create a custom image)
- Click the "Create a custom image" button in the top right corner
- 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
- Click on "Compute" tab in the left nav
- Click the "Custom Images" tab on the top bar
- Click the "Create Custom Image"
- Select the dropdown to "Select a source image"
- If you do not see the VM from which you intend to create a custom image, please power it off and retry the operation.
Note: 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.
~ Listing Images ~
CLI:
crusoe compute images list
UI:
In order to view all currently deployed images via the Crusoe Cloud console:
- Visit the Crusoe Cloud Console
- Click the "Compute" tab in the left nav
- Click the "Instances" tab on the top bar
- Click the "Create Instance" button in the top right corner
- When the Instance Options is set to "Default", Click the "Select an image" and "Select an image version" dropdowns to view all Curated images
- When the Instance Options is set to "Custom", Click the "Select a custom image" dropdown to view all custom images
- Custom Images can also be viewed by selecting "Storage" tab in the left nav and clicking on the Custom Images tab in the top bar.
In order to only view Custom Images in Crusoe Cloud Console:
- Visit the Crusoe Cloud Console
- Click on "Compute" tab in the left nav
- Click the "Custom Images" tab on the top bar
~ Using Images ~
CLI: 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 \
...
UI:
In order to use a VM image in the Crusoe Cloud console:
- Visit the Crusoe Cloud Console
- Click the "Compute" tab in the left nav
- Click the "Instances" tab on the top bar
- Click the "Create Instance" button in the top right corner
- To create an instance with a curated image, select "Default" on Instance Options and click the "Select an image" and "Select an image version" dropdown and select an image and version
- To create an instance with a custom image, select "Custom" on the Instance Options and click the "Select an image" dropdown
- Continue with the remainder of the "Create Instance" flow
~ Update Custom Images ~
CLI:
Use the compute vms update
command, passing an description
flag to update the description:
crusoe compute images update <vm-name>\
--description my-new-description \
...
Use the compute vms 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 vms 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 \
...
UI:
In order to update a Custom image in the Crusoe Cloud console:
- Visit the Crusoe Cloud Console
- Click the "Compute" tab in the left nav
- Click the "Custom Images" tab on the top bar
- Navigate to the Custom Image you wish to edit
- Click the pencil icon on the far right side of the row
- Edit the tags and description as necessary
- Click on the update button to apply the changes
~ Delete Custom Images ~
CLI:
crusoe compute images delete <my-custom-image>
UI:
In order to delete a custom image in the Crusoe Cloud console:
- Visit the Crusoe Cloud Console
- Click the "Compute" tab in the left nav
- Click the "Custom Images" tab on the top bar
- Navigate to the Custom Image you wish to delete
- Click the trash can icon on the far right side of the row
- Input the name of the custom image in the input box and click "Confirm"
FAQs
Quotas
By default, customers can create up to 128 custom images per project. To request an increase in this quota, please contact support.
Limitations
Customers cannot do the following:
- Create a custom image from a VM while it is not SHUTOFF.
- Start a VM while a custom image is being created from it.
- Create a custom image from a disk which is not an OS disk.
- Delete all tags for a custom image. Every custom image must have at least one tag.
Comments
0 comments
Article is closed for comments.