Skip to content

Commit d308160

Browse files
author
Jill Grant
authored
Merge pull request #274238 from schaffererin/userstory251383
Generation 2 VM GA and updates
2 parents e15fb1a + 236e431 commit d308160

File tree

5 files changed

+103
-126
lines changed

5 files changed

+103
-126
lines changed

.openpublishing.redirection.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4004,6 +4004,11 @@
40044004
"source_path_from_root":"/articles/service-connector/quickstart-cli-aks-connection.md",
40054005
"redirect_url":"/azure/service-connector/quickstart-portal-aks-connection",
40064006
"redirect_document_id":false
4007-
}
4007+
},
4008+
{
4009+
"source_path_from_root":"/articles/aks/generation-2-vm-windows.md",
4010+
"redirect_url":"/azure/aks/generation-2-vm",
4011+
"redirect_document_id":false
4012+
}
40084013
]
40094014
}

articles/aks/TOC.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@
290290
href: manage-node-pools.md
291291
- name: Reduce image pull time with Artifact Streaming on AKS
292292
href: artifact-streaming.md
293+
- name: Use generation 2 VMs
294+
href: generation-2-vm.md
293295
- name: Add an Azure Spot node pool
294296
href: spot-node-pool.md
295297
- name: Node pool snapshot
@@ -766,8 +768,6 @@
766768
href: use-windows-hpc.md
767769
- name: Upgrade from Windows Server 2019 to 2022
768770
href: upgrade-windows-2019-2022.md
769-
- name: Use generation 2 VMs
770-
href: generation-2-vm-windows.md
771771
- name: Create Dockerfiles for Windows Server containers
772772
href: /virtualization/windowscontainers/manage-docker/manage-windows-dockerfile?context=/azure/aks/context/aks-context
773773
- name: Optimize Dockerfiles for Windows Server containers

articles/aks/generation-2-vm-windows.md

Lines changed: 0 additions & 119 deletions
This file was deleted.

articles/aks/generation-2-vm.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
title: Use Generation 2 virtual machines in Azure Kubernetes Service (AKS)
3+
description: Learn how to use Generation 2 virtual machines on Windows and Linux node pools in Azure Kubernetes Service (AKS).
4+
ms.topic: article
5+
ms.custom: azure-kubernetes-service
6+
ms.date: 05/03/2024
7+
ms.author: schaffererin
8+
author: schaffererin
9+
---
10+
11+
# Use generation 2 virtual machines in Azure Kubernetes Service (AKS)
12+
13+
Azure supports [Generation 2 (Gen 2) virtual machines (VMs)](../virtual-machines/generation-2.md). Generation 2 VMs support key features not supported in Generation 1 (Gen 1) VMs, including increased memory, Intel Software Guard Extensions (Intel SGX), and virtualized persistent memory (vPMEM).
14+
15+
Generation 2 VMs use the new UEFI-based boot architecture rather than the BIOS-based architecture used by Generation 1 VMs. Only specific SKUs and sizes support Generation 2 VMs. Check the [list of supported sizes](../virtual-machines/generation-2.md#generation-2-vm-sizes) to see if your SKU supports or requires Generation 2.
16+
17+
Additionally, not all VM images support Generation 2 VMs. On AKS, Generation 2 VMs use the AKS Ubuntu 22.04 or 18.04 image or the AKS Windows Server 2022 image. These images support all Generation 2 SKUs and sizes.
18+
19+
## Default behavior for supported vm sizes
20+
21+
There are three scenarios when creating a node pool with a supported VM size:
22+
23+
1. If the VM size supports only Generation 1, the default behavior for both Linux and Windows node pools is to use the Generation 1 node image.
24+
2. If the VM size supports only Generation 2, the default behavior for both Linux and Windows node pools is to use the Generation 2 node image.
25+
3. If the VM size supports both Generation 1 and Generation 2, the default behavior for Linux and Windows differs. Linux uses the Generation 2 node image, and Windows uses Generation 1 image. To use the Generation 2 node image, see [Create a Windows node pool with a Generation 2 VM](#create-a-node-pool-with-a-generation-2-vm).
26+
27+
## Check available Generation 2 VM sizes
28+
29+
Check available Generation 2 VM sizes using the [`az vm list-skus`][az-vm-list-skus] command.
30+
31+
```azurecli-interactive
32+
az vm list-skus --location <location> --size <vm-size> --output table
33+
```
34+
35+
## Create a node pool with a Generation 2 VM
36+
37+
### [Linux node pool](#tab/linux-node-pool)
38+
39+
By default, Linux uses the Generation 2 node image unless the VM size doesn't support Generation 2.
40+
41+
Create a Linux node pool with a Generation 2 VM using the default [node pool creation][create-node-pools] process.
42+
43+
### [Windows node pool](#tab/windows-node-pool)
44+
45+
By default, Windows uses the Generation 1 node image unless the VM size doesn't support Generation 1.
46+
47+
Create a Windows node pool with a Generation 2 VM using the [`az aks nodepool add`][az-aks-nodepool-add] command. To specify that you want to use Generation 2, add a custom header `--aks-custom-headers UseWindowsGen2VM=true`. Generation 2 VM also requires Windows Server 2022.
48+
49+
```azurecli-interactive
50+
az aks nodepool add --resource-group <resource-group-name> --cluster-name <cluster-name> --name <node-pool-name> --vm-size <supported-generation-2-vm-size> --os-type Windows --os-sku Windows2022 --aks-custom-headers UseWindowsGen2VM=true
51+
```
52+
53+
---
54+
55+
## Update an existing node pool to use a Generation 2 VM
56+
57+
### [Linux node pool](#tab/linux-node-pool)
58+
59+
If you're using a VM size that only supports Generation 1, you can update your node pool to a vm size that supports Generation 2 using the [`az aks nodepool update`][az-aks-nodepool-update] command. This update changes your node image from Generation 1 to Generation 2.
60+
61+
```azurecli-interactive
62+
az aks nodepool update --resource-group <resource-group-name> --cluster-name <cluster-name> --name <node-pool-name> --vm-size <supported-generation-2-vm-size> --os-type Linux
63+
```
64+
65+
### [Windows node pool](#tab/windows-node-pool)
66+
67+
If you're using a Generation 1 image, you can update your node pool to use Generation 2 by selecting a VM size that supports Generation 2 using the [`az aks nodepool update`][az-aks-nodepool-update] command. To specify that you want to use Generation 2, add a custom header `--aks-custom-headers UseWindowsGen2VM=true`. Generation 2 VM also requires Windows Server 2022. This update changes your node image from Generation 1 to Generation 2.
68+
69+
```azurecli-interactive
70+
az aks nodepool update --resource-group <resource-group-name> --cluster-name <cluster-name> --name <node-pool-name> --vm-size <supported-generation-2-vm-size> --os-type Windows --os-sku Windows2022 --aks-custom-headers UseWindowsGen2VM=true
71+
```
72+
---
73+
74+
## Check if you're using a Generation 2 node image
75+
76+
Verify a successful node pool creation using the [`az aks nodepool show`][az-aks-nodepool-show] command and check that the `nodeImageVersion` contains `gen2` in the output.
77+
78+
```azurecli-interactive
79+
az aks nodepool show --resource-group <resource-group-name> --cluster-name <cluster-name> --name <node-pool-name>
80+
```
81+
82+
## Next steps
83+
84+
To learn more about Generation 2 VMs, see [Support for Generation 2 VMs on Azure](../virtual-machines/generation-2.md).
85+
86+
<!-- LINKS -->
87+
[az-aks-nodepool-add]: /cli/azure/aks/nodepool#az_aks_nodepool_add
88+
[az-aks-nodepool-show]: /cli/azure/aks/nodepool#az_aks_nodepool_show
89+
[az-aks-nodepool-update]: /cli/azure/aks/nodepool#az_aks_nodepool_update
90+
[create-node-pools]: ./create-node-pools.md
91+
[az-vm-list-skus]: /cli/azure/vm#az_vm_list_skus

articles/aks/windows-vs-linux-containers.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ This article covers important considerations to keep in mind when using Windows
3636
| [AKS Image Cleaner][aks-image-cleaner] | Not supported. |
3737
| [BYOCNI][byo-cni] | Not supported. |
3838
| [Open Service Mesh][open-service-mesh] | Not supported. |
39-
| [GPU][gpu] | Not supported. |
39+
| [GPU][windows-gpu] | Supported in preview. |
4040
| [Multi-instance GPU][multi-instance-gpu] | Not supported. |
41-
| [Generation 2 VMs (preview)][gen-2-vms] | Supported in preview. |
41+
| [Generation 2 VMs (preview)][gen-2-vms] | Supported but not by default. |
4242
| [Custom node config][custom-node-config] | • Custom node config has two configurations:<br/> • [kubelet][custom-kubelet-parameters]: Supported in preview.<br/> • OS config: Not supported. |
4343

4444
## Next steps
@@ -60,9 +60,9 @@ For more information on Windows containers, see the [Windows Server containers F
6060
[node-image-upgrade]: node-image-upgrade.md
6161
[byo-cni]: use-byo-cni.md
6262
[open-service-mesh]: open-service-mesh-about.md
63-
[gpu]: gpu-cluster.md
63+
[windows-gpu]: use-windows-gpu.md
6464
[multi-instance-gpu]: gpu-multi-instance.md
65-
[gen-2-vms]: cluster-configuration.md#generation-2-virtual-machines
65+
[gen-2-vms]: generation-2-vm.md
6666
[custom-node-config]: custom-node-configuration.md
6767
[custom-kubelet-parameters]: custom-node-configuration.md#kubelet-custom-configuration
6868

0 commit comments

Comments
 (0)