This topic describes how to use a Key Management Service (KMS) domain name authorized by Microsoft to activate a genuine Windows operating system for an Elastic Compute Service (ECS) instance that resides in a virtual private cloud (VPC).
Background information
If you purchased a Windows Server license in Alibaba Cloud, Alibaba Cloud automatically activates a genuine Windows Server operating system by using the license.
You may purchase Windows Server licenses in Alibaba Cloud in the following scenarios:
You select a Windows Server image from Alibaba Cloud public images to create an ECS instance.
You create an ECS instance from an imported custom image that uses a license of the Alibaba Cloud License type.
If the Windows Server license fails to be activated for specific reasons, manually activate the license.
The following table describes the KMS domain names in different regions.
When you allow access to or from the IP address that corresponds to a KMS domain name authorized by Microsoft 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 |
Malaysia (Kuala Lumpur) | my.kms.cloud.aliyuncs.com |
Indonesia (Jakarta) | id.kms.cloud.aliyuncs.com |
UK (London) | eu.kms.cloud.aliyuncs.com |
Procedure
In this example, an ECS instance that runs the Windows operating system in a VPC in the Chinese mainland is activated. If you want to activate an ECS instance in a different region, use the KMS domain name that corresponds to the region.
Connect to the Windows ECS instance that you want to activate.
For more information, see Use Workbench to connect to a Windows instance over RDP.
On the Windows desktop, choose , enter cmd, and then press the Enter key to open the Command Prompt.
Run the following command to change the KMS domain name:
slmgr -skms kms.cloud.aliyuncs.com
ImportantIf 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
may fail. 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.
The following message indicates that the KMS domain name is changed. In the message, click OK.
Run the following command to activate KMS, which is unrelated to Alibaba Cloud KMS:
slmgr -ato
The following command output indicates that KMS is activated.
References
The Windows operating system may fail to be activated due to various reasons, such as network exceptions, server clock synchronization issues, or an incorrect activation code. For information about how to resolve the issue, see What do I do if the Windows operating system of an ECS instance fails to be activated?