Help Center/ Image Management Service/ Getting Started/ Scenario 1: Creating a System Disk Image from a Windows ECS
Updated on 2024-08-29 GMT+08:00

Scenario 1: Creating a System Disk Image from a Windows ECS

If you have created and configured an ECS based on your service requirements (such as installing software and deploying an application environment), you can create a system disk image from the configured ECS. Then, any new ECSs created from this image will come with all the same software and other details preconfigured.

This guide describes how to create a system disk image from a Windows ECS.

Preparations

  1. Sign up for Huawei Cloud and complete real-name authentication.

    Before using IMS, sign up for a HUAWEI ID, enable Huawei Cloud services, and complete real-name authentication.

    If you have enabled Huawei Cloud services and completed real-name authentication, skip this step.

  2. Top up your account.

    Ensure that your account has sufficient balance. If not, top up your account.

  3. Create an ECS.

Step 1: Check the ECS

  1. Log in to the management console. In the service list, choose Compute > Elastic Cloud Server.
  2. Locate the ECS and click Remote Login.
    Figure 1 Remote login
  3. Perform the following operations on the ECS:
    • Delete sensitive data from the ECS to prevent data leaks.
    • Check the network configuration of the ECS and ensure that DHCP is configured for the ECS NICs. Enable remote desktop connection if needed. For details, see Setting the NIC to DHCP and Enabling Remote Desktop Connection.
    • Check whether the one-click password reset plug-in has been installed in the ECS. After the plug-in is installed, the passwords of new ECSs created from the image of this ECS can be reset on the console. For details, see Installing the One-Click Password Reset Plug-In.
    • Check whether Cloudbase-Init has been installed in the ECS. After Cloudbase-Init is installed, user data can be injected into the new ECSs created from the image of this ECS. For example, you can use data injection to set the password of a new ECS. For details, see Installing and Configuring Cloudbase-Init.
    • Check and install PV and VirtIO drivers in the ECS so that the new ECSs created from the image of this ECS support both KVM and XEN virtualization and that the network performance will be improved. For details, see Installing PV Drivers and Installing VirtIO Drivers.
    • Run Sysprep on the ECS so that each of the new ECSs created from the image of this ECS has a unique SID in a domain. In a cluster, each ECS must have a unique SID. For details, see Running Sysprep.

Step 2: Create a Windows System Disk Image

  1. Select the ECS and in the Operation column choose More > Manage Image > Create Image.
  2. In the Image Type and Source area, select Create Image for Type and System disk image for Image Type. Then, select the ECS.
    Figure 2 Creating a system disk image
  3. In the Image Information area, enter basic information about the image.
    Figure 3 Image information
    Table 1 Image parameters

    Parameter

    Example Value

    Description

    Name

    win-image

    Enter a name for the image.

    Enterprise Project

    default

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

    An enterprise project provides central management of cloud resources on a project.

    Tag

    Key: usage

    Value: project

    (Optional) Set a tag key and a tag value for the image to make identification and management of your images easier.

    NOTE:

    If your organization has configured tag policies for images, you need to add tags to your images based on the policies. If you add a tag that does not comply with the tag policies, images may fail to be created. Contact the organization administrator to learn more about the tag policies.

    • Each tag consists of a key and a value. The key contains a maximum of 36 characters, and the value contains a maximum of 43 characters. The key cannot be left blank or be an empty string. The value cannot be left blank but can be an empty string.
    • An image can have a maximum of 10 tags.

    Description

    imageTest

    (Optional) Enter a description of the image.

  4. Read and agree to the image disclaimer. Click Next.
  5. Confirm the parameter settings and click Submit.
  6. Go back to the private image list and view the image status.

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

Follow-up Procedure

After a system disk image is created, you can use it to create an ECS or change the OS of an existing ECS. This way, you can migrate data from a server to another. For details, see:

For more information, see Creating a System Disk Image from a Windows ECS.