You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-machines/windows-in-place-upgrade.md
+45-36Lines changed: 45 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,47 +5,42 @@ services: virtual-machines
5
5
author: cynthn
6
6
ms.topic: how-to
7
7
ms.custom: devx-track-azurepowershell
8
-
ms.date: 01/19/2023
8
+
ms.date: 07/05/2023
9
9
ms.author: cynthn
10
10
---
11
11
12
12
# In-place upgrade for VMs running Windows Server in Azure
13
13
14
-
An in-place upgrade allows you to go from an older operating system to a newer one while keeping your settings, server roles, and data intact. This article teaches you how to move your Azure VMs to a later version of Windows Server using an in-place upgrade. Currently, upgrading to Windows Server 2016, Windows Server 2019 and Windows Server 2022 are supported.
14
+
An in-place upgrade allows you to go from an older operating system to a newer one while keeping your settings, server roles, and data intact. This article teaches you how to move your Azure VMs to a later version of Windows Server using an in-place upgrade. Currently, upgrading to Windows Server 2012, Windows Server 2016, Windows Server 2019 and Windows Server 2022 are supported.
15
15
16
16
Before you begin an in-place upgrade:
17
17
18
18
- Review the upgrade requirements for the target operating system:
19
19
20
+
- Upgrade options for Windows Server 2012 from Windows Server 2008 (64-bit) or Windows Server 2008 R2
21
+
20
22
- Upgrade options for Windows Server 2016 from Windows Server 2012 or Windows Server 2012 R2
21
23
22
24
- Upgrade options for Windows Server 2019 from Windows Server 2012 R2 or Windows Server 2016
23
25
24
26
- Upgrade options for Windows Server 2022 from Windows Server 2016 or Windows Server 2019
25
27
26
-
- Verify the operating system disk has enough [free space to perform the in-place upgrade](/windows-server/get-started/hardware-requirements#storage-controller-and-disk-space-requirements). If additional space is needed [follow these steps](./windows/expand-os-disk.md) to expand the operating system disk attached to the VM.
28
+
- Verify the operating system disk has enough [free space to perform the in-place upgrade](/windows-server/get-started/hardware-requirements#storage-controller-and-disk-space-requirements). If more space is needed [follow these steps](./windows/expand-os-disk.md) to expand the operating system disk attached to the VM.
27
29
28
30
- Disable antivirus and anti-spyware software and firewalls. These types of software can conflict with the upgrade process. Re-enable antivirus and anti-spyware software and firewalls after the upgrade is completed.
29
31
30
-
## Windows versions not yet supported for in-place upgrade
31
-
For the following versions, consider using the [workaround](#workaround) later in this article:
32
-
33
-
- Windows Server 2008 R2 Datacenter
34
-
- Windows Server 2008 R2 Standard
35
32
36
-
## Upgrade VM to volume license (KMS server activation)
33
+
## Upgrade VM to volume license (KMS server activation)
37
34
38
-
The upgrade media provided by Azure requires the VM to be configured for Windows Server volume licensing. This is the default behavior for any Windows Server VM that was installed from a generalized image in Azure. If the VM was imported into Azure, then it may need to be converted to volume licensing to use the upgrade media provided by Azure. To confirm the VM is configured for volume license activation follow these steps to [configure the appropriate KMS client setup key](/troubleshoot/azure/virtual-machines/troubleshoot-activation-problems#step-1-configure-the-appropriate-kms-client-setup-key). If the activation configuration was changed, then follow these steps to [verify connectivity to Azure KMS service](/troubleshoot/azure/virtual-machines/troubleshoot-activation-problems#step-2-verify-the-connectivity-between-the-vm-and-azure-kms-service).
35
+
The upgrade media provided by Azure requires the VM to be configured for Windows Server volume licensing. This is the default behavior for any Windows Server VM that was installed from a generalized image in Azure. If the VM was imported into Azure, then it might need to be converted to volume licensing to use the upgrade media provided by Azure. To confirm the VM is configured for volume license activation follow these steps to [configure the appropriate KMS client setup key](/troubleshoot/azure/virtual-machines/troubleshoot-activation-problems#step-1-configure-the-appropriate-kms-client-setup-key). If the activation configuration was changed, then follow these steps to [verify connectivity to Azure KMS service](/troubleshoot/azure/virtual-machines/troubleshoot-activation-problems#step-2-verify-the-connectivity-between-the-vm-and-azure-kms-service).
39
36
40
37
41
38
42
-
## Upgrade to Managed Disks
39
+
## Upgrade to Managed Disks
43
40
44
41
The in-place upgrade process requires the use of Managed Disks on the VM to be upgraded. Most VMs in Azure are using Managed Disks, and retirement for unmanaged disks support was announced in November of 2022. If the VM is currently using unmanaged disks, then follow these steps to [migrate to Managed Disks](./windows/migrate-to-managed-disks.md).
45
42
46
-
47
-
48
-
## Create snapshot of the operating system disk
43
+
## Create snapshot of the operating system disk
49
44
50
45
We recommend that you create a snapshot of your operating system disk and any data disks before starting the in-place upgrade process. This enables you to revert to the previous state of the VM if anything fails during the in-place upgrade process. To create a snapshot on each disk, follow these steps to [create a snapshot of a disk](./snapshot-copy-managed-disk.md).
51
46
@@ -60,13 +55,16 @@ To start an in-place upgrade the upgrade media must be attached to the VM as a M
60
55
| location | Azure region where the upgrade media Managed Disk is created. This must be the same region as the VM to be upgraded. |
61
56
| zone | Azure zone in the selected region where the upgrade media Managed Disk will be created. This must be the same zone as the VM to be upgraded. For regional VMs (non-zonal) the zone parameter should be "". |
62
57
| diskName | Name of the Managed Disk that will contain the upgrade media |
63
-
| sku | Windows Server upgrade media version. This must be either: `server2016Upgrade` or `server2019Upgrade` or `server2022Upgrade`|
58
+
| sku | Windows Server upgrade media version. This must be either: `server2016Upgrade` or `server2019Upgrade` or `server2022Upgrade` or `server2012Upgrade`|
59
+
60
+
If you have more than one subscription, you should run `Set-AzsSubscription -SubscriptionId <String>` to specify which subscription to use.
64
61
65
62
### PowerShell script
66
63
67
64
```azurepowershell-interactive
68
65
#
69
-
# Customer specific parameters
66
+
# Customer specific parameters
67
+
70
68
71
69
# Resource group of the source VM
72
70
$resourceGroup = "WindowsServerUpgrades"
@@ -80,7 +78,7 @@ $zone = ""
80
78
# Disk name for the that will be created
81
79
$diskName = "WindowsServer2022UpgradeDisk"
82
80
83
-
# Target version for the upgrade - must be either server2022Upgradeor server2019Upgrade
81
+
# Target version for the upgrade - must be either server2022Upgrade, server2019Upgrade, server2016Upgrade or server2012Upgrade
84
82
$sku = "server2022Upgrade"
85
83
86
84
@@ -159,7 +157,7 @@ Attach the upgrade media for the target Windows Server version to the VM which w
159
157
160
158
161
159
162
-
## Perform in-place upgrade
160
+
## Perform in-place upgrade to Windows Server 2016, 2019, or 2022
163
161
164
162
To initiate the in-place upgrade the VM must be in the `Running` state. Once the VM is in a running state use the following steps to perform the upgrade.
165
163
@@ -181,32 +179,42 @@ To initiate the in-place upgrade the VM must be in the `Running` state. Once the
181
179
182
180
During the upgrade process the VM will automatically disconnect from the RDP session. After the VM is disconnected from the RDP session the progress of the upgrade can be monitored through the [screenshot functionality available in the Azure portal](/troubleshoot/azure/virtual-machines/boot-diagnostics#enable-boot-diagnostics-on-existing-virtual-machine).
183
181
184
-
## Post upgrade steps
182
+
## Perform in-place upgrade to Windows Server 2012 only
185
183
186
-
Once the upgrade process has completed successfully the following steps should be taken to clean up any artifacts which were created during the upgrade process:
184
+
To initiate the in-place upgrade the VM must be in the `Running` state. Once the VM is in a running state use the following steps to perform the upgrade.
187
185
188
-
- Delete the snapshots of the OS disk and data disk(s) if they were created.
186
+
1. Connect to the VM using [RDP](./windows/connect-rdp.md#connect-to-the-virtual-machine) or [RDP-Bastion](../bastion/bastion-connect-vm-rdp-windows.md#rdp).
189
187
190
-
- Delete the upgrade media Managed Disk.
188
+
1. Determine the drive letter for the upgrade disk (typically E: or F: if there are no other data disks).
191
189
192
-
- Enable any antivirus, anti-spyware or firewall software that may have been disabled at the start of the upgrade process.
190
+
1. Start Windows PowerShell.
193
191
194
-
## Workaround
192
+
1. Change directory to the only directory on the upgrade disk.
193
+
194
+
1. Execute the following command to start the upgrade:
195
+
196
+
```powershell
197
+
.\setup.exe
198
+
```
199
+
200
+
1. When Windows Setup launches, select **Install now**.
201
+
1. For **Get important updates for Windows Setup**, select **No thanks**.
202
+
1. Select the correct Windows Server 2012 "Upgrade to" image based on the current version and configuration of the VM using the [Windows Server upgrade matrix](/windows-server/get-started/upgrade-overview).
203
+
1. On the **License terms** page, select **I accept the license terms** and then select **Next**.
204
+
1. For **What type of installation do you want?" select **Upgrade: Install Windows and keep files, settings, and applications**.
205
+
1. Setup will product a **Compatibility report**, you can ignore any warnings and select **Next**.
206
+
1. When complete, the machine will reboot and you will automatically be disconnected from the RDP session. After the VM is disconnected from the RDP session the progress of the upgrade can be monitored through the [screenshot functionality available in the Azure portal](/troubleshoot/azure/virtual-machines/boot-diagnostics#enable-boot-diagnostics-on-existing-virtual-machine).
195
207
196
-
For versions of Windows that are not currently supported, create an Azure VM that's running a supported version. And then either migrate the workload (Method 1, preferred), or download and upgrade the VHD of the VM (Method 2).
197
-
To prevent data loss, back up the Windows 10 VM by using [Azure Backup](../backup/backup-overview.md). Or use a third-party backup solution from [Azure Marketplace Backup & Recovery](https://azuremarketplace.microsoft.com/marketplace/apps?page=1&search=Backup+&exp=ubp8).
198
-
### Method 1: Deploy a newer system and migrate the workload
199
208
200
-
Create an Azure VM that runs a supported version of the operating system, and then migrate the workload. To do so, you'll use Windows Server migration tools. For instructions to migrate Windows Server roles and features, see [Install, use, and remove Windows Server migration tools](/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012).
209
+
## Post upgrade steps
210
+
211
+
Once the upgrade process has completed successfully the following steps should be taken to clean up any artifacts which were created during the upgrade process:
201
212
213
+
- Delete the snapshots of the OS disk and data disk(s) if they were created.
202
214
203
-
### Method 2: Download and upgrade the VHD
204
-
1. Do an in-place upgrade in a local Hyper-V VM
205
-
1.[Download the VHD](./windows/download-vhd.md) of the VM.
206
-
2. Attach the VHD to a local Hyper-V VM.
207
-
3. Start the VM.
208
-
4. Run the in-place upgrade.
209
-
2. Upload the VHD to Azure. For more information, see [Upload a generalized VHD and use it to create new VMs in Azure](./windows/upload-generalized-managed.md).
215
+
- Delete the upgrade media Managed Disk.
216
+
217
+
- Enable any antivirus, anti-spyware or firewall software that may have been disabled at the start of the upgrade process.
210
218
211
219
212
220
## Recover from failure
@@ -227,4 +235,5 @@ If the in-place upgrade process failed to complete successfully you can return t
227
235
228
236
## Next steps
229
237
230
-
For more information, see [Perform an in-place upgrade of Windows Server](/windows-server/get-started/perform-in-place-upgrade)
238
+
- For more information, see [Perform an in-place upgrade of Windows Server](/windows-server/get-started/perform-in-place-upgrade)
239
+
- For information about using Azure Migrate to upgrade, see [Azure Migrate Windows Server upgrade](/azure/migrate/how-to-upgrade-windows)
0 commit comments