You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Creating custom images
Creating custom image based on instance (for Windows)
Copy page
Download PDF
Creating custom image based on instance (for Windows)
This topic describes how to create a system volume image or whole image based on a Windows instance.​
Terms​
​
Term​
Description​
System volume image​
A custom image that contains only system volume data.​
Whole image​
A custom image that contains data from the system volume and data volumes. During the image creation process, the platform creates a separate snapshot for each volume attached to the instance, including the system volume. The collection of these snapshots constitutes a whole image.​
​
Operation instructions​
​
Preparations​
​
Instance​
You have purchased an ECS instance for creating a custom image. For more information, see Purchasing ECS instances.​
Dependent feature​
The snapshot feature is enabled to store custom image data. For more information, see Snapshot.​
License type​
​
If the license type of the operating system on your instance is Bring Your Own License (BYOL), the license type of any custom image created from the instance is also BYOL. You need to use your own license to activate the operating system.​
​
Limits for different image types​
​
System volume image​
By default, only a custom image of your system volume is created.​
Whole image​
  • The total amount of data on the system volume and data volumes must not exceed 32 TiB.​
  • You can create a whole image only based on the combination of the system volume and all data volumes of an instance.​
  • You cannot create a whole image for an instance equipped with a local disk or a PTSSD volume.​
tip​
If the specification details of the instance include local storage information, the instance is equipped with a local disk. For example, the Local-SSD i3s instance type falls into this category. For more information, see Instance type overview.​
  • You cannot export a whole image or use a whole image to change the operating system.​
Limits on various volume types​
​
PTSSD volume​
If the ECS instance for which you want to create a custom image is mounted with a PTSSD volume:​
  • Before you create an image, stop the instance first. Otherwise, you cannot create an image.​
  • During the creation process, you cannot change the instance status. For example, you cannot start, stop, or restart the instance. Wait until the custom image is created before you perform operations on the instance.​
ESSD volume​
If the ECS instance for which you want to create a custom image is mounted with an ESSD volume:​
  • Before you create a custom image, you do not need to stop the instance. For volume performance metrics, refer to Volume specifications.​
  • During the creation process, you cannot change the instance status. For example, you cannot start, stop, or restart the instance. Wait until the custom image is created before you perform operations on the instance.​
tip​
When you create a custom image for a running instance, some real-time data may not be saved to the image file. To ensure data integrity, we recommend that you stop the instance before you create an image.​
  • During the creation process, the instance status does not change, and you can start, stop, or restart the instance.​
​
warning​
  • Do not modify the kernel. Otherwise, the custom image you create may not work as expected.​
  • If the available space of the system volume is insufficient, you may fail to create the custom image.​
Step 1: Install software (optional)​
  1. Install software on the target instance based on your business requirements. For example, you can install JDK or a Linux graphical desktop.​
tip​
When you create a non-whole image, you can create a custom image only for your system volume. Therefore, data stored on the data volume is not contained in the image. Install software on the system volume.​
Step 2: Install plugins​
To reset, associate, and disassociate passwords, you must install the password plugin for the custom image you create. Otherwise, the image may not work as expected. For more information, see Installing the password plugin.​
You can also install the CloudMonitor plugin for custom images. This allows you to monitor an instance from within the instance and obtain deeper, more accurate information about the running status of the instance. For more information, see Installing the plugin.​
Step 3: Clear the network interface information​
You need to clear the existing network interface information. Otherwise, information such as the hostname and password cannot be injected into ECS instances created by using the custom image.​
  1. Click the Windows icon and click "Windows System > Run".​
  1. Enter cmd and click the "OK" button to open the command line.​
  1. Execute the ipconfig /release command to release the existing IP address.​
Step 4: Run Sysprep​
You need to use Sysprep to delete specific information from the image so that the image can be used on different devices. For more information, see Sysprep (system preparation) overview.​
  • If you use the public image provided by the platform to create a custom image, execute the following command in the CMD command prompt. For information about the public image versions, see Image release notes .​
  • ​
    reg delete "HKLM\SOFTWARE\Cloudbase Solutions"​
    net stop wuauserv​
    C:\Windows\System32\Sysprep\sysprep.exe /shutdown /generalize /quiet /oobe /unattend:C:\Windows\sysprep-unattend.xml​
    ​
warning​
  • After you execute the command, the instance enters the generalization process:​
  1. Delete information specific to the instance, including but not limited to the Security Identifier (SID), hostname, and password. Applications and related data are retained.​
  1. Uninstall (but do not delete) drivers specific to the instance.​
  1. Specify that the content in the unattended answer file can be added to the existing installation.​
  • After generalization is complete, the instance automatically shuts down.​
  • If you use the public image not provided by the platform to create a custom image, execute the following command in the CMD command prompt.​
  • ​
    %WINDIR%\system32\sysprep\sysprep.exe /generalize /shutdown /oobe​
    ​
warning​
  • After you execute the command, the instance enters the generalization process:​
  1. Delete information specific to the instance, including but not limited to the Security Identifier (SID), hostname, and password. Applications and related data are retained.​
  1. Uninstall (but do not delete) drivers specific to the instance.​
  1. Specify that the instance starts in Out-of-Box Experience (OOBE) mode.​
  1. Specify that the content in the unattended answer file can be added to the existing installation.​
  • After generalization is complete, the instance automatically shuts down.​
  • Cloudbase-init runs after the OOBE process is complete, the password you create during the OOBE process is overwritten by the login password specified in the configuration file. After you create an ECS instance by using the image, use the login password you create during instance creation, rather than the password created during the OOBE process.​
Step 5: Stop the instance​
Stop the target instance. For more information, see Stopping instances.​
tip​
If you use a custom image created based on an ESSD volume or you have run Sysprep, you do not need to stop the instance and can skip this step.​
Step 6: Create a custom image based on the instance​
  1. Log in to the ECS console.​
  1. On the left side of the top menu bar, select the project and region where the instance is located.​
  1. In the left-side navigation pane, click "Instances & Images > Instances". In the left-side navigation pane, select "Elastic Compute Service (ECS) > Instances".​
  1. Click "... > Volumes & Image > Create custom image" in the "Actions" column on the right side of the target instance.​
tip​
If the snapshot feature is not enabled, click "... > Volumes & Image > Create custom image" in the "Actions" column on the right side of the target instance. In the pop-up window, check the box next to "Click to activate, indicating that you are aware and agree Service-Specific Terms for VolcanoEngine Elastic Compute Service", and then click the "Activate" button.​
  1. In the pop-up window, configure the following parameters.​
  • ​
    Parameter​
    Description​
    Sample value​
    Image name​
    Specify the name of the custom image.​
    CentOS7.9-P​
    Project (optional)​
    Select the project to which the custom image belongs.​
    • After you select a project, the created custom image can be viewed and used only by users with permissions on the project.​
    • If no project is available in the drop-down list, you can follow the guidelines to create a project. For more information, see Creating projects.​
    tip​
    A project is a collection of resources. You can add custom images to projects and classify and manage custom images by project. Additionally, you can control the permissions of users and roles within each project on custom images. Learn more.​
    projectA​
    Tag (optional)​
    A tag is a key-value pair used to identify cloud resources. Tags help you categorize cloud resources with similar attributes based on different dimensions, such as purpose, owner, or environment. This allows you to search and aggregate your cloud resources for easy management.​
    Click the + icon and enter the tag key and tag value to add tags to the image. For more information, see Tag overview.​
    Key:Value​
    Production scope (optional)​
    Select the "Creating Whole Images" option based on your business requirements to specify whether to create a custom image that contains data from the system volume and all data volumes.​
    tip​
    When the target instance is mounted with a data volume, a whole image is created by default. You can also unselect the "Creating Whole Images" option to create a custom image that contains only system volume data.​
    -​
    ​
  1. Click the "Create" button and wait until the custom image is created. The time required to create the custom image varies based on the actual amount of data in the volume.​
  1. You can view the progress of creating a custom image on the Custom Image tab or the Executions page.​
  • In the left-side navigation pane, click "Instances & Images > Images", and then select the "Custom Image" tab to view the creation progress.​
  • ​​​
  • In the left-side navigation pane, click "Maintenance & Monitoring > Executions", and view the creation progress on the Executions page.​
  • ​​​
Operation results​
  1. Log in to the ECS console.​
  1. In the top menu bar, select the region and project where the target custom image is located.​
  1. Select the "Custom Image" tab.​
  1. If the status of the target image is Available in the "State" column, the custom image is created.​
  • ​​​
  1. You can also click the image name to go to the image details page, select the "Associative snapshot" tab, and view the IDs of the snapshots associated with the volumes in the image, the volume types, and the capacity of the volumes. For more information, see Snapshot overview.​
  • ​​​
Related documents​
Last updated: 2026.06.18 17:49:50