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.
Requirements
- SPLA licensing activated on your Hosted Private Cloud environment
- From the OVHcloud Control Panel, select
Hosted Private Cloud
from the top navigation menu. -
Select
your environment. - Click the
Windows license
tab. - Click
Activate the SPLA
button.
When successful, you will see a "Status: Your SPLA license has been activated" message.
Topics
- Uninstall the Default Product Key
- Install the New Product Key
- Adjust Firewall and NAT Settings
- Activate the New Product Key
- Contact OVH US Support
Instructions
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.
Now that we have uninstalled our trial license, we are ready to install our new product key.
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 2022 Standard | VDYBN-27WPP-V4HQT-9VMD4-VMK7H |
Windows Server 2022 Datacenter | WX4NM-KYWYW-QJJR4-XV3QB-6VM33 |
Windows Server 2019 Standard | N69G4-B89J2-4G8F4-WWYCC-J464C |
Windows Server 2019 Datacenter | WMDGN-G9PQG-XVVXX-R3X43-63DFG |
Windows Server 2016 Standard | WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY |
Windows Server 2016 Datacenter | CB7KF-BWN84-R7R2Y-793K2-8XDDG |
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.
Before we continue in our Windows VM, we need to allow the necessary connections in our network firewall.
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.
Login to your vSphere Web Client and click vSphere Client at the top of the page. Then click Networking & Security on the following page.
From this new page, select NSX Edges in the left-hand column. Next, click the name of the NSX Edge you wish to configure.
On the new page, click the Firewall tab. From here, we will make our new KMS firewall rule. Click Add Rule to add a new rule.
In our new rule, change the rule by clicking the relevant fields and following the instructions in the pop-up windows. 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, for Service, select the folder under the pencil icon and change the Protocol to TCP (Transmission Control Protocol); type in the port 1688 and click OK. It will look like this when you are done.
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.
On the NSX Edge you just configured, select the NAT tab and click the Add button 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: The interface we created earlier
- 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 Add button 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: The interface we created earlier
- 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.
Now that our firewall and NAT settings are configured we are ready to activate our product key.
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 : 145.239.193.0
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.
We now have our Windows license up and running. To ensure that the license doesn't get rejected by Microsoft, we need to tag each VM running the Windows license.
Contact OVHcloud 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 OVHcloud US Support, please consult our Contacting OVHcloud US Support article.
Conclusion
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.