Skip to content

Commit e2c8235

Browse files
author
Simonx Xu
authored
Merge pull request #9668 from AmandaAZ/BranchCI7130
AB#7130: Private PR of PR#1931
2 parents b5da121 + a982957 commit e2c8235

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

support/azure/virtual-machines/windows/windows-vm-activation-error-0xc004f074.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: Error 0xC004F074 No Key Management Service (KMS) could be contacted
33
description: Learn how to resolve the 0xC004F074 error scenario that occurs when you try to activate an Azure Windows virtual machine (VM).
4-
ms.date: 02/15/2024
4+
ms.date: 09/12/2025
55
ms.service: azure-virtual-machines
66
ms.custom: sap:Cannot activate my Windows VM
77
ms.collection: windows
88
editor: v-jsitser
9-
ms.reviewer: cwhitley, v-naqviadil, v-leedennis
9+
ms.reviewer: cwhitley, mumustafa, v-naqviadil, v-leedennis
1010
---
1111
# Error 0xC004F074 "No Key Management Service (KMS) could be contacted"
1212

@@ -189,4 +189,49 @@ We recommend that you use an Azure Virtual Network NAT configuration for outboun
189189

190190
However, if there's a requirement to block all internet traffic, make sure that you deny outbound internet access by using a network security group (NSG) rule on the subnet of the VM that you have to activate. Notice that operating system activation traffic to the KMS IPs on port 1688 remains enabled because of platform internal rules.
191191

192+
## Solution 3: (For standard internal load balancer) Centralized egress via Azure Firewall without forced tunneling
193+
194+
As mentioned in [Solution 2](#solution-2-for-standard-internal-load-balancer-use-an-nat-gateway-or-a-standard-public-load-balancer), to overcome SNAT port limitations for outbound connectivity, we recommend using an Azure Virtual Network NAT configuration for scalable and resilient outbound traffic management.
195+
196+
If your deployment uses an internal load balancer and routes all outbound traffic via Azure Firewall, this solution is applicable. Use it when:
197+
198+
- Centralized outbound traffic control is needed.
199+
- Forced tunneling to on-premises isn't required.
200+
- NAT Gateway isn't necessary, unless SNAT port exhaustion occurs.
201+
202+
This pattern is common in environments where backend VMs behind an internal load balancer need to access external services (such as KMS servers) via Azure Firewall, while maintaining internal routing simplicity. For more information, see [Integrate Azure Firewall with Azure Standard Internal Load Balancer](/azure/firewall/integrate-lb#internal-load-balancer).
203+
204+
### Flow summary for inbound and outbound traffic
205+
206+
- Inbound: Client → Internal load balancer → Backend VM → Client
207+
- Outbound: Backend VM → User Defined Route (`0.0.0.0/0`) → Azure Firewall → Internet
208+
209+
### Steps to perform Windows Activation via Azure Firewall
210+
211+
1. Verify outbound routing configuration.
212+
213+
Ensure that outbound traffic from the VM subnet is routed to Azure Firewall by using a User Defined Route: `0.0.0.0/0` → Azure Firewall.
214+
2. Add a network rule on Azure Firewall to allow outbound traffic to the KMS server:
215+
216+
| Field | Value |
217+
|--|--|
218+
| Destination | The fully qualified domain name (FQDN) of the KMS server: `azkms.core.windows.net`, the IP address that `azkms.core.windows.net` resolves to: `20.118.99.224` or `40.83.235.53`, the IP address that `kms.core.windows.net` resolves to: `23.102.135.246`, or the IP address of the appropriate KMS endpoint that applies to your region |
219+
| Port |1688 |
220+
| Protocol | TCP |
221+
| Action| Allow |
222+
223+
3. Verify that the DNS resolution from the VM completes successfully and returns the correct IP addresses.
224+
4. Activate Windows by running the following command in an elevated command prompt:
225+
226+
```cmd
227+
slmgr.vbs /ato
228+
```
229+
230+
5. If activation fails, check Azure Firewall diagnostics:
231+
232+
- Check network rule logs to verify that traffic on port 1688 is allowed.
233+
- Verify that the rule matches the resolved IP, port, and protocol.
234+
- Verify that there are no implicit denies or misconfigured rule priorities.
235+
236+
192237
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]

0 commit comments

Comments
 (0)