Creating a System Disk Image from a Windows ECS
Scenarios
If you have created and configured a Windows ECS based on your service requirements (for example, by installing software and setting up an application environment), you can create a system disk image based on this configured ECS. Then, all new ECSs created from this image will have the same software and environment preinstalled.
Creating a system disk image does not affect the running of services on the ECS or cause data loss.
Background
The following figure shows the process of creating a system disk image from an ECS.
- System disk images are often used for application scale-out. They can also be used for hybrid cloud deployment. You can create system disk images for resource synchronization on and off cloud. The procedure is as follows:
- Create a system disk image from an ECS.
The ECS must be created from a private image. If it is created from a public image, the system disk image cannot be exported.
- Export the image to an OBS bucket. For details, see Exporting an Image.
- Download the image file from the OBS bucket.
- Create a system disk image from an ECS.
- You can create an image from a running ECS.
The image creation does not affect service running on the ECS.
In this process, do not stop, start, or restart the ECS, or the image creation may fail.
- The time required for creating an image depends on the ECS system disk size, network quality, and the number of concurrent tasks.
- A system disk image will be created in the same region as the ECS that was used to create it. For example, if an ECS is located in the CN-Hong Kong region, the system disk image created from that ECS will also be located in the CN-Hong Kong region. If you want to use the image in another region, you must first replicate it to that 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 any sensitive data the ECS may contain.
- 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 if needed. For details, see Configuring DHCP and Enabling Remote Desktop Connection.
- Check whether the one-click password reset plug-in has been installed on the ECS. The password reset function on the management console is only available for new ECSs that have this plug-in installed. For details, see Installing the One-Click Password Reset Plug-In.
- Check whether Cloudbase-Init has been installed on the ECS. The user data injection function on the management console is only available for new ECSs that have this tool installed. You can use data injection, for example, to set the login password for a new ECS. For details, see Installing and Configuring Cloudbase-Init.
- Check and install VirtIO drivers to ensure that new ECSs created from the image support KVM virtualization and to improve network performance.
For details, see steps 2 to 4 in Optimization Process.
- Run Sysprep to ensure that the SIDs of the new ECSs created from the image are unique within their domain. In a cluster deployment scenario, the SIDs must be unique. For details, see Running Sysprep.
- Ensure that the system disk capacity of the ECS used to create a system disk image must be no greater than 1 TB.
If the capacity is greater than 1 TB, you can only use it to create a full-ECS image.
If an 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
- Access the IMS console.
- Log in to the management console.
- Under Compute, click Image Management Service.
The IMS console is displayed.
- Create a system disk image.
- Click Create Image in the upper right corner.
- Set image parameters.
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
Type
Select Create Image.
Region
Select a region close to where your services will be provided.
If you select an incorrect region here, you can replicate the created image to your desired region later. For details, see Replicating an Image Across Regions.
Image 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 whether the image will be encrypted. The value is provided by the system and 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 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
(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 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
(Optional) Enter a description of the image.
- Read and agree to the disclaimer, and click Next.
- Confirm the settings and click Submit.
- Go back to the Private Images page and view the new system disk image.
The time required for creating an image depends on the ECS system disk size, network quality, and the number of concurrent tasks. When the image status changes to Normal, the image creation is complete.
- Do not perform any operations 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 Procedure
After a system disk image is created, you can:
- Use the image to create new ECSs. For details, see Creating an ECS from an Image.
- Use the image to change the OSs of existing ECSs. For details, see Changing the OS.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot