At OVHcloud, our mission is to allow flexibility in how our customers can use our products. For this reason, we strive to provide our customers with as many options as possible when purchasing products, bringing a license, or using an OVHcloud template. When registering a Windows VM in an HPC (Hosted Private Cloud) environment, you can create a VM using our OVF template or install a new product key on a VM and activate it against our KMS (Key Management Services). If you have difficulties with your default Windows Product Key, activating a new product key against our KMS will solve it. In this article, we will cover activating your own license against our KMS. If you would like more information about using an OVF template to install Windows, please consult our Creating a VM Using a Windows OVF article.
- Uninstall the Default Product Key
- Install the New Product Key
- Adjust Firewall and NAT Settings
- Activate the New Product Key
- Contact OVH US Support
Uninstall the Default Product Key
When Windows is installed without a license or if the license provided during installation is invalid, a trial license will be installed in its stead. We will need to uninstall this default product key before we can install our new license. To do so, click on the "magnifying glass" in the bottom-left corner, type "run", and select the Run application.
In the text box for the "Run" application, type
cscript.exe c:\windows\system32\slmgr.vbs -upk and select OK.
Install the New Product Key
To install our new product key, we must first locate what product key we need for our Windows environment. Below is a list of product keys corresponding with each Windows Server OS you may be running. For more information on these product keys, please consult Microsoft's documentation.
|Operating System||Product Key|
|Windows Server 2008 Standard||TM24T-X9RMF-VWXK6-X8JC9-BFGM2|
|Windows Server 2008 Enterprise||YQGMW-MPWTJ-34KDK-48M3W-X4Q6W|
|Windows Server 2008 Datacenter||7M67G-PC374-GR742-YH8V4-TCBY3|
|Windows Server 2008 R2 Standard||YC6KT-GKW9T-YTKYR-T4X34-R7VHC|
|Windows Server 2008 R2 Enterprise||489J6-VHDMP-X63PK-3K798-CPX3Y|
|Windows Server 2008 R2 Datacenter||74YFP-3QFB3-KQT8W-PMXWJ-7M648|
|Windows Server 2012 Standard||XC9B7-NBPP2-83J2H-RHMBY-92BT4|
|Windows Server 2012 Datacenter||48HP8-DN98B-MYWDG-T2DCC-8W83P|
|Windows Server 2012 R2 Standard||D2N9P-3P6X9-2R39C-7RTCD-MDVJX|
|Windows Server 2012 R2 Datacenter||W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9|
|Windows 8.1 Professional||GCRJD-8NW9H-F2CDX-CCM8D-9D6T9|
|Windows Server 2016 Datacenter||CB7KF-BWN84-R7R2Y-793K2-8XDDG|
|Windows Server 2016 Standard||WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY|
|Windows Server 2016 Essentials||JCKRF-N37P4-C2D82-9YXRT-4M63B|
Navigate back to the Run application and type in the following command:
cscript.exe c:\windows\system32\slmgr.vbs -ipk PRODUCT KEY replacing "PRODUCT KEY" with the key that corresponds to the operating system you have chosen to run.
Adjust Firewall and NAT Settings
For our Windows VM to be able to connect to OVHcloud's automated KMS system, we will need to edit our network firewall settings.
Note: In our example, we will be utilizing our NSX Edge to edit these settings.
Login to your vSphere Web Client and select Networking and Security from the Home drop-down.
From this new page, select NSX Edges on the left-hand column. Next, double-click the NSX Edge you wish to configure.
In the new page, select the Manage tab and click Firewall. From here, we will make our new KMS firewall rule. Select the + symbol to add a new rule.
In our new rule, specify a name by selecting the name field. Leave the "Type" and "Source" fields as their default. For Destination, click the IP button under the pencil symbol and type in the IP of our NSX edge. Lastly, under the Service tab, select the folder under the pencil icon and change the Protocol to TCP (Transmission Control Protocol); type in the port 1688 and click OK.
Select the new Publish Changes button that appears to save the rule.
Now that our KMS firewall rule is set up, we can proceed with configuring the appropriate SNAT (Source Network Address Translation) and DNAT (Destination Network Address Translation) rules.
From the Manage tab select NAT and click the + icon to create a new SNAT rule.
This will bring up the "Add SNAT Rule" pop-up. Here we need to select the following options:
- Applied On: Uplink
- Protocol: any
- Original Source IP/Range: Your Windows VM Private IP/IP Range
- Destination IP/Range: any
- Translated Source IP/Range: Your NSX Edge IP.
This will allow our Windows VM to route all traffic through our NSX Edge. Click the OK button to add the rule.
Lastly, click the Publish Changes button that appears.
The next rule we need to add is our DNAT rule. Click the + icon again and select Add DNAT Rule. This will bring up the "Add DNAT Rule" pop-up. On this pop-up make the following selections:
- Applied On: Uplink
- Protocol: tcp
- Source IP/Range: any
- Source Port/Range: any
- Original Destination IP/Range: Your NSX Edge IP
- Original Destination Port/Range: 1688
- Translated IP/Range: Your Windows VM Private IP/IP Range
- Translated Port/Range: 1688
Once complete, click the OK button to add the rule.
Once finished, make sure to click the Publish Changes button that appears.
Activate the New Product Key
Before we execute the commands to activate our product key, let's make sure our NAT and Firewall rules are working appropriately.
In your Windows VM open Windows PowerShell by clicking the "magnifying glass" in the bottom-left corner, type "PowerShell" and select the Windows PowerShell Desktop app.
In PowerShell type the following command:
tnc kms.ovh.net -port 1688
If everything is correct you should see an output similar to the following, with a "TcpTestSucceeded" marked as "True".
ComputerName : kms.ovh.net
RemoteAddress : 22.214.171.124
RemotePort : 1688
InterfaceAlias : Ethernet0
SourceAddress : 192.168.1.2
PingSucceeded : True
PingReplyDetails (RTT) : 83 ms
TcpTestSucceeded : True
Now that we know the connection works, we need to associate the product key with OVHcloud's automated KMS system. Click on the "magnifying glass" in the bottom-left corner, type "run", and select the Run application.
In the Run application, write the following command:
cscript.exe c:\windows\system32\slmgr.vbs -skms kms.ovh.net. Next, click on the OK button.
Finally, to activate the new product key for the Windows OS, enter
cscript.exe c:\windows\system32\slmgr.vbs -ato in the Run application and click OK to complete.
Contact OVH US Support
To get your Windows VMs appropriately tagged, you will need to reach out to our support team. For more information on how to contact OVH US Support, please consult our Contacting OVH US Support article.
Whether you wish to install Windows using an OVF template or install it using a new product key, OVHcloud has you covered. Having read this article, you are now able to install and activate your new product key.