Create Custom Images
Last updated: 2019-07-25 18:26:02PDF
Overview of Creation
You can launch an instance with a public image or a service marketplace image, and then connect to the instance and deploy your software environment. If the instance runs normally, you can create a new custom image based on this instance as needed, so that you can use this image to launch more new instances that have the same custom configurations with the original one.
- Shut down instance:
Shut down the instance before you can create a custom image to ensure that the image has exactly the same deployment environment as that of the current instance.
- Data migration:
To keep the data in the original instance data disk when you lunch a new instance, you can first take a Snapshot of the data disk, and then create a new CBS data disk with this snapshot when launching the new instance.
- Each region supports a maximum of 10 custom images.
The following directory and files will be removed.
/root/.bash_history, /home/ubuntu/.bash_history (Ubuntu system)
/etc/fstab will reset to avoid launch failure due to no data disk found.
Create an image from an instance via the console
Log in to the CVM Console.
Shut down the instance. Select the instance to be shut down, and then click Shutdown on the top.
Click More on the right side of the instance used to create an image, and click Create Image.
Enter Image Name and Image Description in the pop-up box, and click OK to submit the creation application.
To purchase a server with the same image as the previous one, click Create CVM on the right side of the image in the image list.
Create an image using API
You can use the API CreateImage to create a custom image. For more information, please see the API Create Image.