This topic describes how to create a custom image from an ENS instance or from an image build machine.
Usage notes
After you create or import a custom image, the status of the image changes to Available. You can then use the image to create instances, share the image with other Alibaba Cloud accounts, or export the image to an OSS bucket. If you no longer need the image, you can delete it.
After you create an instance, you can customize the instance to meet your business requirements, for example, by installing software or deploying an application environment. You can then create a custom image from the updated instance. New instances that you create from this image include the custom items that you configured, which saves you from customizing each instance again.
Create a custom image from an instance
The Create a custom image from an instance feature supports only the following instance types: X86 Compute, X86 Bare Machine, X86 Bare Metal, ARM Compute, Heterogeneous Virtual Machine, and Heterogeneous Bare Metal.
An ENS instance is created. For more information, see Create an instance.
Sensitive data is deleted from the instance to prevent data security risks.
Before you create the custom image, make sure that the instance is in the Stopped state.
Log on to the ENS console.
In the left-side navigation pane, choose Resources and Images>Instances.
Find the target instance in the instance list. In the Operation column, choose
> Create Image.In the Create Custom Image dialog box, configure Image Name.
Click OK.
Create a custom image from a build machine
The Create a custom image from a build machine feature can create only X86 Compute image types.
When you create an image build machine, Advanced Options is optional, and you usually do not need to configure it. If you want to verify data disk attachment and partitioning, expand the advanced options when you create the image, enter your data disk requirements, and complete the data disk attachment during image creation.
After you create the image build machine and before you upload the image, make sure that the image build machine is in the Stopped state.
Log on to the ENS console.
In the left-side navigation pane, choose Resources and Images>Images.
On the Image Builder tab, click Create Image and follow the on-screen instructions to create the image.
Click OK.
On the Image Builder tab, obtain the IP address of the build machine, log on to the build machine over Secure Shell (SSH), and deploy your software and applications.
Click Upload Image. After the upload is complete, click Release Build Machine.