Help Center> Image Management Service> User Guide> Creating a Private Image> Creating a System Disk Image from a Windows ECS

Creating a System Disk Image from a Windows ECS

Scenarios

If you have created a Windows ECS and configured it (such as software installation and application environment deployment) based on your business requirements, you can create a system disk image from the configured ECS. Then, the configurations will be applied to all the new ECSs created from this image.

Background

The following figure shows the process of creating a system disk image from an ECS.

Figure 1 Creating a system disk image and using it to create ECSs
  • System disk images are commonly used for application expansion. They can also be used for hybrid cloud deployment. For example, you can export a system disk image from the public cloud and then import it to a private cloud so as to synchronize resources from the public cloud to the private cloud. The procedure is as follows:
    1. Create a system disk image from an ECS.

      Use an ECS created from a private image. Otherwise, the system disk image cannot be exported.

    2. Export the image to an OBS bucket. For details, see Exporting Images.
    3. Download the image file from the OBS bucket and upload it to the private cloud.
  • You can create an image from a running ECS. In this process, do not stop, start, or restart the ECS. Otherwise, the image creation may fail.
  • The time required for creating an image depends on the ECS system disk size, network status, and number of concurrent tasks.
  • A system disk image will be created in the same region as the ECS that is used to create it. For example, if an ECS is located in the CN North-Beijing4 region, the system disk image created from the ECS will also be located in the CN North-Beijing4 region. If you want to use the image in another region, replicate it to the target region. For details, see Replicating Images Across Regions.
  • If an ECS has expired or been released, you can use the system disk image created from the ECS to restore it.

Prerequisites

Before creating a private image from an ECS:

  • Delete sensitive data in the ECS to prevent data security risks.
  • Ensure that the ECS is in the Running or Stopped state.
  • Check network configuration of the ECS and ensure that DHCP is configured for the NICs. Enable remote desktop connection as needed. For details, see Setting the NIC to DHCP and Enabling Remote Desktop Connection.
  • Install special drivers. The normal running and advanced functions of some ECSs depend on certain drivers. For example, GPU-accelerated ECSs depend on the Tesla and GRID/vGPU drivers. For details, see Installing Special Windows Drivers.
  • Check whether the one-click password reset plug-in has been installed in the ECS. The password reset function on the management console is available for the new ECSs created from the image only after the plug-in is installed. For details, see Installing the One-Click Password Reset Plug-In.
  • Check whether Cloudbase-Init has been installed in the ECS. The user data injection function on the management console is available for the new ECSs created from the image only after the tool is installed. For example, you can use the data injection function to set the login password for a new ECS. For details, see Installing and Configuring Cloudbase-Init.
  • Check and install the PV driver and UVP VMTools driver to ensure that the new ECSs created from the image support both KVM and XEN virtualization and to improve network performance.

    For details, see steps 2 to 5 in Optimization Process.

  • Run Sysprep to ensure that the SIDs of the new ECSs created from the image are unique in a domain. In a cluster deployment scenario, the SIDs must be unique. For details, see Running Sysprep.

If the ECS is created from a public image, the one-click password reset plug-in and Cloudbase-Init have been installed by default. You can follow the guide in the prerequisites to verify the installation.

Procedure

  1. Log in to the management console.
  2. Under Computing, click Image Management Service.

    The IMS console is displayed.

  3. Click Create Image in the upper right corner.
  4. Configure the following information:

    Table 1 and Table 2 list the parameters in the Image Type and Source and Image Information areas, respectively.

    Table 1 Image type and source

    Parameter

    Description

    Region

    Select a region close to your business.

    If you select an incorrect region here, you can replicate the created image to your desired region. For details, see Replicating an Image Across Regions.

    Type

    Select System disk image.

    Source

    Select ECS and select an ECS with required configurations.

    Table 2 Image information

    Parameter

    Description

    Encryption

    This parameter specifies the encryption attribute of the image. The value cannot be changed.

    • Only an unencrypted private image can be created from an unencrypted ECS.
    • Only an encrypted private image can be created from an encrypted ECS.

    Name

    Set a name for the image.

    Enterprise Project

    Select an enterprise project from the drop-down list. This parameter is available only when you have enabled the enterprise project function, or your account is an enterprise account. To enable this function, contact your customer manager.

    An enterprise project provides a cloud resource management mode, in which cloud resources and members are centrally managed by project.

    Tag

    (Optional) Set a tag key and a tag value for the image to easily identify and manage it.

    Description

    (Optional) Enter description of the image.

  5. Click Next.
  6. Confirm the parameters. Read and select the agreement, and click Submit.
  7. Go back to the private image list and view the image status.

    The time required for creating an image depends on the ECS system disk size, network status, and number of concurrent tasks. When the image status changes to Normal, the image is created successfully.

    • Do not perform any operation on the selected ECS or its associated resources during image creation.
    • An ECS created from an encrypted image is also encrypted. The key used for encrypting the ECS is the same as that used for encrypting the image.
    • An image created from an encrypted ECS is also encrypted. The key used for encrypting the image is the same as that used for encrypting the ECS.

Follow-up Operations

After a system disk image is created successfully, you can use the image to create an ECS or change the OS of an existing ECS to migrate data between two ECSs. For details, see the following: