All Products
Search
Document Center

Elastic Compute Service:How do I use KMS domain names to activate a Windows instance in a VPC?

Last Updated:Jun 17, 2025

This topic explains how to activate a genuine Windows Server system on an Elastic Compute Service (ECS) instance in a VPC network using the KMS domain name authorized by Microsoft for Alibaba Cloud.

Background information

Alibaba Cloud automatically activates the genuine Windows Server system for you when you purchase a Windows Server license.

You might purchase a Windows Server license on Alibaba Cloud in scenarios such as:

  • Creating an ECS instance using a Windows Server image from Alibaba Cloud's public images.

  • Creating an ECS instance with a custom image imported under the license type Alibaba Cloud official license.

Refer to this topic for manual activation if the automatic process fails.

Below are the KMS domain names for different regions.

Important

To allow the IP corresponding to the KMS domain name authorized by Microsoft in the firewall or security group, view it by executing ping KMS domain name. For instance, to view the IP for the KMS domain name in the Chinese mainland, execute ping kms.cloud.aliyuncs.com.

Region name

KMS domain name

Chinese mainland

kms.cloud.aliyuncs.com

China (Hong Kong)

kms.cloud.aliyuncs.com

Singapore

sg.kms.cloud.aliyuncs.com

US (Silicon Valley)

us1.kms.cloud.aliyuncs.com

US (Virginia)

us2.kms.cloud.aliyuncs.com

Japan (Tokyo)

jp.kms.cloud.aliyuncs.com

Germany (Frankfurt)

de.kms.cloud.aliyuncs.com

UAE (Dubai)

db.kms.cloud.aliyuncs.com

Malaysia (Kuala Lumpur)

my.kms.cloud.aliyuncs.com

Indonesia (Jakarta)

id.kms.cloud.aliyuncs.com

UK (London)

eu.kms.cloud.aliyuncs.com

Procedure

This topic illustrates activating a Windows Server operating system ECS instance in a VPC network in the Chinese mainland. For ECS instances in other regions, use the corresponding region's KMS domain name.

  1. Connect to the ECS instance.

    For more information, see Use Workbench to connect to a Windows instance over RDP.

  2. Click Start > Run, type cmd, and press the Enter key to open the command line window.

  3. Run the following command to change the KMS domain name:

    slmgr -skms kms.cloud.aliyuncs.com
    Important
    • If the command fails, ensure that you are using Alibaba's DNS server. Using a non-Alibaba DNS may prevent kms.cloud.aliyuncs.com from resolving correctly. For ECS instances in a VPC, it's recommended to set the default DNS server to 100.100.2.136 or 100.100.2.138.

    • For ECS instances in a classic network, execute the command slmgr -skms kms.aliyun-inc.com to change the KMS domain name.

    A message similar to the one below indicates a successful change of the KMS domain name. Click OK.

  4. Activate the KMS service (unrelated to Alibaba Cloud's Key Management Service).

    slmgr -ato

    The following message confirms a successful activation.

Reference

If Windows system activation fails, potential causes include network abnormalities, server clock synchronization issues, incorrect activation codes, or other factors. For more information, see What do I do if the Windows operating system of an ECS instance fails to be activated?