Skip to content

Commit 916ec40

Browse files
authored
Merge pull request #8872 from MicrosoftDocs/main
Auto push to live 2025-05-07 02:31:59
2 parents 24b7d8d + 071d119 commit 916ec40

File tree

2 files changed

+64
-39
lines changed

2 files changed

+64
-39
lines changed
Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,65 @@
11
---
2-
title: Windows nodepools not upgraded to Gen2 during cluster node image upgrade
3-
description: Troubleshoot why Windows Server nodepools don't get upgraded automatically from Gen1 to Gen2 when a cluster node image is upgraded in Azure Kubernetes Service.
4-
ms.date: 11/20/2024
2+
title: Windows Node Pools Not Upgraded to Gen2 During Cluster Node Image Upgrade
3+
description: Troubleshoot an issue that prevents Windows Server node pools from upgrading automatically to Gen2 when a cluster node image is upgraded in Azure Kubernetes Service.
4+
ms.date: 04/17/2025
55
editor: v-jsitser
6-
ms.reviewer: chiragpa, cssakscic, v-leedennis
6+
ms.reviewer: chiragpa, cssakscic, momajed
77
ms.service: azure-kubernetes-service
8-
#Customer intent: As an Azure Kubernetes Services (AKS) user, I want to troubleshoot why Windows Server nodepools don't get upgraded automatically from Gen1 to Gen2 virtual machines (VMs) when a cluster node image is upgraded in Azure Kubernetes Service (AKS).
9-
ms.custom: sap:Create, Upgrade, Scale and Delete operations (cluster or nodepool)
8+
#Customer intent: As an Azure Kubernetes Services (AKS) user, I want to troubleshoot why Windows Server node pools don't get upgraded automatically from Gen1 to Gen2 virtual machines (VMs) when a cluster node image is upgraded in Azure Kubernetes Service (AKS).
9+
ms.custom: sap:Create, Upgrade, Scale and Delete operations (cluster or node pool)
1010
---
11-
# Windows Server nodepools not upgraded to Gen2 during cluster node image upgrade
1211

13-
This article discusses how to troubleshoot a scenario in which Windows Server nodepools don't get upgraded automatically from Gen1 to Gen2 virtual machines (VMs) when a cluster node image is upgraded in Microsoft Azure Kubernetes Service (AKS).
12+
# Windows Server node pools not upgraded to Gen2 during cluster node image upgrade
13+
14+
This article discusses how to troubleshoot a scenario in which Windows Server node pools don't get upgraded automatically from Gen1 to Gen2 virtual machines (VMs) when a cluster node image is upgraded in Microsoft Azure Kubernetes Service (AKS).
1415

1516
> [!NOTE]
16-
> This scenario doesn't apply to Gen2 VMs on Linux nodepools.
17+
> This scenario doesn't apply to Gen2 VMs on Linux node pools.
1718
1819
## Prerequisites
1920

20-
- [Azure CLI](/cli/azure/install-azure-cli)
21+
- Azure CLI version 2.0.81 or later. See [Install Azure CLI](/cli/azure/install-azure-cli) for installation instructions.
2122

2223
## Symptoms
2324

24-
Existing Windows Server nodepools don't get upgraded from Gen1 to Gen2 when you [upgrade the node image](/azure/aks/node-image-upgrade) by using one of the following methods in Azure CLI:
25+
Existing Windows Server node pools don't get upgraded from Gen1 to Gen2 when you [upgrade the node image](/azure/aks/node-image-upgrade) by using one of the following methods in Azure CLI:
2526

26-
- An entire cluster upgrade (by using the [az aks upgrade](/cli/azure/aks#az-aks-upgrade) command)
27+
- An entire cluster upgrade (by using the [`az aks upgrade`](/cli/azure/aks#az-aks-upgrade) command)
2728

28-
- A specific nodepool upgrade (by using the [az aks nodepool upgrade](/cli/azure/aks/nodepool#az-aks-nodepool-upgrade) command)
29+
- A specific node pool upgrade (by using the [`az aks nodepool upgrade`](/cli/azure/aks/nodepool#az-aks-nodepool-upgrade) command)
2930

3031
## Cause
3132

32-
### Cause 1: Existing nodepools aren't automatically upgraded to Gen2 VMs
33+
### Cause 1: Existing node pools aren't automatically upgraded to Gen2 VMs
3334

34-
By design, a node image upgrade doesn't support updating or upgrading existing nodepools. The `az aks upgrade` and `az aks nodepool upgrade` commands upgrade only the node image (to a later node image version). Those commands don't upgrade the corresponding VM generation.
35+
By design, a node image upgrade doesn't support updating or upgrading existing node pools. The `az aks upgrade` and `az aks nodepool upgrade` commands upgrade only the node image (to a later node image version). These commands don't upgrade the corresponding VM generation.
3536

3637
### Cause 2: Cluster upgrade to Kubernetes version 1.25 or a later version upgrades only the OS
3738

38-
When you upgrade your cluster to Kubernetes version 1.25 or a later version, only the operating system (OS) is upgraded (to Windows Server 2022). Existing nodepools aren't affected. The associated VM scale set will contain VMs that have the same Gen1 VM.
39+
When you upgrade your cluster to Kubernetes version 1.25 or a later version, only the operating system (OS) is upgraded (to Windows Server 2022). Existing node pools aren't affected. The associated Azure Virtual Machine Scale Sets contain VMs that have the same Gen1 VM.
3940

40-
### Cause 3: Cluster upgraded and new nodepool created by using Windows Server 2022 without specifying a valid VM size
41+
### Cause 3: Cluster upgraded and new node pool created by using Windows Server 2022 without specifying a valid VM size
4142

42-
After you upgrade the cluster to Kubernetes version 1.25 or a later version, you specify Windows Server 2022 as the OS to use on the nodepool's VMs. However, the VMs don't use a Gen2 node image reference because of one of the following reasons:
43+
After you upgrade the cluster to Kubernetes version 1.25 or a later version, you specify Windows Server 2022 as the OS to use on the node pool's VMs. However, the VMs don't use a Gen2 node image reference for one of the following reasons:
4344

4445
- You don't specify a VM size, and the default VM size in the region doesn't support Gen2 VMs.
4546

4647
- You specify a Gen1-only VM size.
4748

48-
When you upgrade the default OS from Windows Server 2019 (`Windows2019`) to Windows Server 2022 (`Windows2022`), the existing nodepools aren't automatically upgraded to a different VM generation.
49+
When you upgrade the default OS from Windows Server 2019 (`Windows2019`) to Windows Server 2022 (`Windows2022`), the existing node pools aren't automatically upgraded to a different VM generation.
4950

5051
## Solution
5152

52-
Upgrade the cluster, and then create a new Windows Server nodepool that supports [Gen2 VM sizes](/azure/virtual-machines/generation-2) on that cluster according to the following guidelines.
53+
Upgrade the cluster, and then create a new Windows Server node pool that supports [Gen2 VM sizes](/azure/virtual-machines/generation-2) on that cluster according to the following guidelines.
5354

5455
| Kubernetes cluster upgrade version | Cluster creation guidelines |
5556
|---|---|
56-
| 1.25 or a later version | When you run the [az aks create](/cli/azure/aks#az-aks-create) command to create a cluster, set the `--node-vm-size` parameter to a [Gen2 VM size](/azure/virtual-machines/generation-2). |
57-
| Earlier version than 1.25 | When you run the [az aks create](/cli/azure/aks#az-aks-create) command to create a cluster, set the `--os-sku` parameter value to `Windows2022`, and set the `--node-vm-size` parameter value to a [Gen2 VM size](/azure/virtual-machines/generation-2). |
57+
| 1.25 or a later version | When you run the [`az aks create`](/cli/azure/aks#az-aks-create) command to create a cluster, set the `--node-vm-size` parameter to a [Gen2 VM size](/azure/virtual-machines/generation-2). |
58+
| Any version earlier than 1.25 | When you run the [`az aks create`](/cli/azure/aks#az-aks-create) command to create a cluster, set the `--os-sku` parameter value to `Windows2022`, and set the `--node-vm-size` parameter value to a [Gen2 VM size](/azure/virtual-machines/generation-2). |
59+
5860

5961
> [!NOTE]
60-
> If you specify a Gen2 VM size and the operating system as Windows Server 2019, you receive an `ErrorCode_Windows2019NotSupportedWithGen2VM` error code that's accompanied by the following error message:
62+
> If you specify a Gen2 VM size and set the operating system as Windows Server 2019, you receive an `ErrorCode_Windows2019NotSupportedWithGen2VM` error code that's accompanied by the following error message:
6163
>
6264
> > \<virtual-machine-size> is a Gen 2-only VM. Windows2019 does not support Gen 2 VMs. However, you can select a Gen 1 VM size or set os_sku to 2022.
6365
>
@@ -66,5 +68,11 @@ Upgrade the cluster, and then create a new Windows Server nodepool that supports
6668
> - Pick a Gen1 VM size to use together with Windows Server 2019.
6769
>
6870
> - Set the operating system SKU to **Windows Server 2022** to use together with your Gen2 VM.
71+
>
72+
> - Before you create a new node pool, verify that the VM size supports Gen2 VMs in your region. To do this, run `az vm list-sizes --location <region> --query "[?contains(name, 'v2')].name" --output table`.
73+
>
74+
> - To verify the current and available node image versions, run the following commands:
75+
> - To check the current version: `az aks nodepool show --resource-group <resource-group> --cluster-name <cluster-name> --name <nodepool-name> --query nodeImageVersion`
76+
> - To check the latest available version: `az aks nodepool get-upgrades --resource-group <resource-group> --cluster-name <cluster-name> --nodepool-name <nodepool-name> --query latestNodeImageVersion`
6977
7078
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]

support/windows-client/networking/mapped-network-drive-fail-reconnect.md

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Mapped network drive may fail to reconnect in Windows 10, version 1809
33
description: An article provides a workaround to resolve mapped network drives not working in Windows 10, version 1809.
4-
ms.date: 01/15/2025
4+
ms.date: 05/07/2025
55
manager: dcscontentpm
66
audience: itpro
77
ms.topic: troubleshooting
@@ -51,9 +51,9 @@ while($True){
5151
foreach( $MappedDrive in $MappedDrives)
5252
{
5353
try {
54-
New-SmbMapping -LocalPath $MappedDrive.LocalPath -RemotePath $MappedDrive.RemotePath -Persistent $True
54+
New-SmbMapping -LocalPath $MappedDrive.LocalPath -RemotePath $MappedDrive.RemotePath -Persistent $True -ErrorAction Stop
5555
} catch {
56-
Write-Host "There was an error mapping $MappedDrive.RemotePath to $MappedDrive.LocalPath"
56+
Write-Host "There was an error mapping $($MappedDrive.RemotePath) to $($MappedDrive.LocalPath)"
5757
}
5858
}
5959
$i = $i - 1
@@ -72,28 +72,45 @@ All workarounds should be executed in standard user security context. Executing
7272
> [!NOTE]
7373
> This workaround works only for the device that has network access at logon. If the device has not established a network connection by the time of logon, the startup script won't automatically reconnect network drives.
7474
75-
1. Copy the script file (MapDrives.cmd) to the following location:
76-
%ProgramData%\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp
77-
2. Copy the script file (MapDrives.ps1) to the following location:
78-
%SystemDrive%\\Scripts\\
79-
3. A log file (StartupLog.txt) will be created in the %TEMP%\\ folder.
80-
4. Log off, and then log back on to the device to open the mapped drives.
75+
1. Copy the script file **MapDrives.cmd** to the following location:
76+
**%ProgramData%\\Microsoft\\Windows\\Start Menu\\Programs\\StartUp**
77+
2. Copy the script file **MapDrives.ps1** to the following location: **%SystemDrive%\\Scripts\\**.
78+
3. A log file **StartupLog.txt** is created in the **%TEMP%\\** folder.
79+
4. Sign out, and then sign in to the device to open the mapped drives.
8180

8281
#### Workaround 2: Create a scheduled task
8382

8483
> [!NOTE]
8584
> A PowerShell window flashes up when the scheduled task runs.
8685
87-
1. Copy the script file MapDrives.ps1 to the following location:
88-
%SystemDrive%\\Scripts\\
86+
1. Copy the script file **MapDrives.ps1** to the following location: **%SystemDrive%\\Scripts\\**.
8987
2. In **Task Scheduler**, select **Action** > **Create Task**.
90-
3. On the **General** tab in the **Create Task** dialog box, type a name (such as *Map Network Drives*) and description for the task.
88+
3. On the **General** tab in the **Create Task** dialog, type a name (such as **Map Network Drives**) and description for the task.
9189
4. Select **Change User or Group**, select a local user or group (such as **LocalComputer\\Users**) and then select **OK**.
9290
5. On the **Triggers** tab, select **New**, and then select **At log on** for the **Begin the task** field.
9391
6. On the **Actions** tab, select **New**, and then select **Start a program** for the **Action** field.
94-
7. Type _Powershell.exe_ for the **Program/script** field.
92+
7. Type **Powershell.exe** for the **Program/script** field.
9593
8. In the **Add arguments (optional)** field, type the following:
96-
_-windowstyle hidden -command .\\MapDrives.ps1 >> %TEMP%\\StartupLog.txt 2>&1_
97-
9. In the **Start in (optional)** field, type the location (_%SystemDrive%\\Scripts\\_) of the script file.
94+
**-windowstyle hidden -command .\\MapDrives.ps1 >> %TEMP%\\StartupLog.txt 2>&1**
95+
9. In the **Start in (optional)** field, type the location of the script file: **%SystemDrive%\\Scripts\\**.
9896
10. On the **Conditions** tab, select the **Start only if the following network connection is available** option, select **Any connection**, and then select **OK**.
99-
11. Log off, and then log back on to the device to run the scheduled task.
97+
11. Sign out, and then sign in to the device to run the scheduled task.
98+
99+
#### Workaround 3: Create a scheduled task for VPN connection Event ID 20225
100+
101+
> [!NOTE]
102+
> Event ID 20225 indicates that a virtual private network (VPN) connection is successfully established.
103+
104+
1. Copy the script file **MapDrives.ps1** to the following location: **%SystemDrive%\\Scripts\\**.
105+
2. In **Task Scheduler**, select **Action** > **Create Task**.
106+
3. On the **General** tab in the **Create Task** dialog, type a name (such as **Map Network Drives**) and description for the task.
107+
4. Select **Change User or Group**, select a local user or group (such as **LocalComputer\\Users**) and then select **OK**.
108+
5. On the **Triggers** tab, select **New**, and then select **On an event** for the **Begin the task** field.
109+
6. Select **Application** from the **Log** dropdown list, type **RasClient** in the **Source** field, and type **20225** in the **Event ID** field. Then, select **OK**.
110+
7. On the **Actions** tab, select **New**, and then select **Start a program** for the **Action** field.
111+
8. Type **Powershell.exe** for the **Program/script** field.
112+
9. In the **Add arguments (optional)** field, type the following:
113+
**-windowsstyle hidden -command .\\MapDrives.ps1 >> %TEMP%\\StartupLog.txt 2>&1**
114+
10. In the **Start in (optional)** field, type the location of the script file: **%SystemDrive%\\Scripts\\**.
115+
11. On the **Conditions** tab, select the **Start only if the following network connection is available** option, select **Any connection**, and then select **OK**.
116+
12. Sign out, and then sign in to the device to run the scheduled task.

0 commit comments

Comments
 (0)