All Products
Search
Document Center

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

Last Updated:Sep 29, 2024

This topic describes how to use specific Key Management Service (KMS) domain names to activate a Windows Elastic Compute Service (ECS) instance that is deployed in a virtual private cloud (VPC).

Background information

The following table describes the Alibaba Cloud region-specific KMS domain names.

Important

If you want to allow access to or from the IP address that corresponds to a KMS domain name in the firewall or security groups, you can run the ping <KMS domain name> command to query the IP address that corresponds to the KMS domain name. For example, to query the IP address that corresponds to the KMS domain name specific to regions inside the Chinese mainland, run the ping kms.cloud.aliyuncs.com command.

Region name

KMS domain name

Regions inside the 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

Australia (Sydney) Closing Down

au.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 section describes how to activate a Windows instance that is deployed in a VPC in a region inside the Chinese mainland. If you want to activate a Windows instance in a region outside of the Chinese mainland, replace the KMS domain name in the sample commands with the KMS domain name specific to the region.

  1. Connect to the Windows instance that you want to activate.

    For more information, see Connect to a Windows instance by using a password or key.

  2. On the Windows desktop, choose , enter cmd, and then press the Enter key to open the Command Prompt.

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

    slmgr -skms kms.cloud.aliyuncs.com
    Important
    • If the KMS domain name fails to be changed, check whether the Domain Name System (DNS) server that you use is an Alibaba Cloud DNS server. If the DNS server is not an Alibaba Cloud DNS server, the resolution of kms.cloud.aliyuncs.com fails. For an instance that is deployed in a VPC, we recommend that you set the default DNS server to 100.100.2.136 or 100.100.2.138.

    • If your instance is deployed in the classic network, run the slmgr -skms kms.aliyun-inc.com command to change the KMS domain name.

  4. Run the following command to activate KMS:

    slmgr -ato

References

Windows may fail to be activated due to various reasons, such as network exceptions, server clock synchronization issue, or an incorrect activation code. For more information, see What do I do if the Windows operating system of an ECS instance fails to be activated?.