Creating Custom Images

Last updated: 2021-02-26 14:21:47


    In addition using Tencent Cloud public images, you can create custom images to quickly create Tencent Cloud CVM instances with the same configurations.


    • Images use the CBS snapshot service for data storage. When you create a custom image, a snapshot will be automatically created and associated with the image. You will be charged for this snapshot. For more information, see Billing Overview.
    • For CVMs that are created based on public images after July 2018 and use cloud disks as system disks, you can create images without shutting down the instance. For other CVMs, you need to shut down the instance before creating a custom image to ensure that the image has the same deployment environment as the current instance.


    • Each region supports a maximum of 10 custom images.
    • The following directories and files will be removed.
      • /var/log/
      • /root/.bash_history and /home/ubuntu/.bash_history (for the Ubuntu operating system)
    • When creating a custom image on a Linux instance, make sure /etc/fstab does not contain data disk configuration. Otherwise, instances created with this image cannot be started normally. If the Linux instance that is used to create a custom image has a data disk mounted, comment out or delete the relevant data disk configurations in /etc/fstab.
    • The creation process takes ten minutes or more, which depends on the data size of the instance. Please prepare in advance to avoid business impacts.


    Creating a custom image from an instance through the console

    1. Log in to the CVM console.
    2. On the instance management page, select the instance for which images will be created, and click More > Instance Status > Shut down, as shown below:
    3. After the instance is shut down, click More> Create Image, as shown below:
    4. In the pop-up window, enter Image Name and Description, and click Create Image.


      You can click in the top-right corner to view the image creation progress.

    5. After the image is created, click Images on the left sidebar to enter the image management page.
    6. In the image list, select the image you have created, and click Create an Instance to purchase a server with the same configuations as the image.
      Custom Image

    Creating a custom image through API

    You can use the CreateImage API to create a custom image. For more information, see CreateImage.

    Best Practices

    Migrating the data on a data disk

    If you need to keep the data on the data disk of the original instance when launching a new instance, you can first take a snapshot of the data disk, and then use this snapshot to create a new cloud data disk.
    For more information, see Creating Cloud Disks Using Snapshots.