tencent cloud

Feedback

Creating a Custom Image

Last updated: 2024-01-08 09:37:00

    Overview

    Besides public images, you can also create custom images, with which you can create CVM instances with the same configurations.
    Note:
    Images use the CBS snapshot service for data storage:
    Upon the creation of a custom image, a snapshot is automatically created and associated with the image. As a result, retaining custom images incurs costs. For more information, please see Billing Overview.

    Note

    Each region supports a maximum of 10 custom images.
    When the Linux instance has a data disk attached, and you only create an image on the system disk, make sure /etc/fstab does not include data disk configuration. Otherwise, instances created with this image cannot be started normally.
    The creation process takes ten minutes or longer, which depends on the data size of the instance. Please prepare in advance to avoid business impacts.
    You can not create an image by using a CBM instance in the console or via API. You can use CVM to create them.
    If your Windows instance needs to enter a domain and uses a domain account, please execute Sysprep before creating a custom image to ensure that the SID is unique after the instance enters the domain. For more information, please see Ensuring Unique SIDs for CVMs Using Sysprep.

    Directions

    Console
    API

    Shut down an instance (optional)

    1. Log in to the CVM console and check whether the corresponding instance needs to be shut down.
    Note:
    For CVMs created based on public images after July 2018, you can create images without shutting down the instance. For other CVMs, shut down the instance before creating a custom image to ensure that the image has the same environment deployment as the current instance.
    If the instance needs to be shut down, proceed to the next step.
    If the instance doesn’t need to be shut down, please proceed to Create a custom image.
    2. On the instance management page, proceed according to the actually used view mode:
    List view: In the row of the target instance, select More > Instance status > Shut down on the right as shown below:
    
    
    Tab view: Select Shut down on the instance details page.
    
    

    Create a custom image

    1. On the instance management page, proceed according to the actually used view mode:
    List view: Select More > Create image.
    
    
    Tab view: Select More actions > Create image in the top-right corner.
    
    
    2. In the Create a custom image popup window, complete the configuration.
    Image name and Image description: Custom name and description.
    Tag: You can add tags for the instance as needed, which are used to categorize, search for, and aggregate cloud resources. For more information, see Overview.
    Note:
    To create custom images that include system disks and data disks, please submit a ticket.
    3. Click Create image. You can click Image on the left sidebar to view the creation progress in the Image page.

    Use the custom image to create an instance (optional)

    Select the image you created in the image list, and click Create instance on the right side to purchase a server with the same configuration as the image, as shown in the following figure:
    
    
    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 data disk snapshot to create a new CBS data disk. For more information, please see Creating Cloud Disks Using Snapshots.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support