Skip to content

Commit 15670b9

Browse files
authored
Merge pull request #243536 from cynthn/2012-in-place-upgrade
2012 in-place upgrade
2 parents 8175e10 + 9bf7c5b commit 15670b9

File tree

1 file changed

+45
-36
lines changed

1 file changed

+45
-36
lines changed

articles/virtual-machines/windows-in-place-upgrade.md

Lines changed: 45 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,47 +5,42 @@ services: virtual-machines
55
author: cynthn
66
ms.topic: how-to
77
ms.custom: devx-track-azurepowershell
8-
ms.date: 01/19/2023
8+
ms.date: 07/05/2023
99
ms.author: cynthn
1010
---
1111

1212
# In-place upgrade for VMs running Windows Server in Azure
1313

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.
1515

1616
Before you begin an in-place upgrade:
1717

1818
- Review the upgrade requirements for the target operating system:
1919

20+
- Upgrade options for Windows Server 2012 from Windows Server 2008 (64-bit) or Windows Server 2008 R2
21+
2022
- Upgrade options for Windows Server 2016 from Windows Server 2012 or Windows Server 2012 R2
2123

2224
- Upgrade options for Windows Server 2019 from Windows Server 2012 R2 or Windows Server 2016
2325

2426
- Upgrade options for Windows Server 2022 from Windows Server 2016 or Windows Server 2019
2527

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.
2729

2830
- 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.
2931

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
3532

36-
## Upgrade VM to volume license (KMS server activation)
33+
## Upgrade VM to volume license (KMS server activation)
3734

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).
3936

4037

4138

42-
## Upgrade to Managed Disks
39+
## Upgrade to Managed Disks
4340

4441
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).
4542

46-
47-
48-
## Create snapshot of the operating system disk
43+
## Create snapshot of the operating system disk
4944

5045
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).
5146

@@ -60,13 +55,16 @@ To start an in-place upgrade the upgrade media must be attached to the VM as a M
6055
| location | Azure region where the upgrade media Managed Disk is created. This must be the same region as the VM to be upgraded. |
6156
| 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 "". |
6257
| 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.
6461

6562
### PowerShell script
6663

6764
```azurepowershell-interactive
6865
#
69-
# Customer specific parameters
66+
# Customer specific parameters
67+
7068
7169
# Resource group of the source VM
7270
$resourceGroup = "WindowsServerUpgrades"
@@ -80,7 +78,7 @@ $zone = ""
8078
# Disk name for the that will be created
8179
$diskName = "WindowsServer2022UpgradeDisk"
8280
83-
# Target version for the upgrade - must be either server2022Upgrade or server2019Upgrade
81+
# Target version for the upgrade - must be either server2022Upgrade, server2019Upgrade, server2016Upgrade or server2012Upgrade
8482
$sku = "server2022Upgrade"
8583
8684
@@ -159,7 +157,7 @@ Attach the upgrade media for the target Windows Server version to the VM which w
159157

160158

161159

162-
## Perform in-place upgrade
160+
## Perform in-place upgrade to Windows Server 2016, 2019, or 2022
163161

164162
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.
165163

@@ -181,32 +179,42 @@ To initiate the in-place upgrade the VM must be in the `Running` state. Once the
181179

182180
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).
183181

184-
## Post upgrade steps
182+
## Perform in-place upgrade to Windows Server 2012 only
185183

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.
187185

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).
189187

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).
191189

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.
193191

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).
195207

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
199208

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:
201212

213+
- Delete the snapshots of the OS disk and data disk(s) if they were created.
202214

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.
210218

211219

212220
## Recover from failure
@@ -227,4 +235,5 @@ If the in-place upgrade process failed to complete successfully you can return t
227235

228236
## Next steps
229237

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

Comments
 (0)