Operating system migration (Windows)
If your operating system (OS) has reached its End of Life (EOL) or you need to upgrade to a higher version to meet business requirements, you can use Server Migration Center (SMC) to migrate your OS in-place. This process retains the data on the system disk of your ECS instance. This topic describes how to migrate Windows Server 2008 R2, 2012 R2, 2016, or 2019 to a higher version by using SMC.
Background
Microsoft ended support for Windows Server 2008 and 2008 R2 on January 14, 2020, and for Windows Server 2012 and 2012 R2 on October 10, 2023. If you have ECS instances that run these operating systems, we recommend that you upgrade them to continue receiving software updates and security patches to avoid issues related to EOL. For more information, see Windows Server operating systems. The OS migration feature of Server Migration Center (SMC) provides several migration paths. After the migration, the OS kernel and major system software packages are upgraded in place, and the data on the system disk is retained.
If you do not need to retain data on the system disk or need more OS conversion options, you can replace the system disk to change the OS.
Migration paths
Windows Server 2008 R2
Windows Server 2008 R2 is no longer supported. You can migrate your workloads to Windows Server 2016 or 2019, which are in the mainstream support phase.
Due to limitations of the Windows OS migration feature, you cannot directly migrate Windows Server 2008 R2 to Windows Server 2016 or 2019. You must first migrate to an intermediate version, Windows Server 2012 R2.
-
Migrate Windows Server 2008 R2 to the intermediate version, Windows Server 2012 R2.
OS architecture
Source OS
Target OS
x86
Windows Server 2008 R2 Standard 64-bit (Chinese/English)
Windows Server 2012 R2 Datacenter 64-bit (Chinese/English)
Windows Server 2008 R2 Enterprise 64-bit (Chinese/English)
-
Migrate Windows Server 2012 R2 to Windows Server 2016 or 2019.
OS architecture
Source OS
Target OS
x86
Windows Server 2012 R2 Datacenter 64-bit (Chinese/English)
-
Windows Server 2016 Datacenter 64-bit (Chinese/English)
-
Windows Server 2019 Datacenter 64-bit (Chinese/English)
-
Windows Server 2012 R2
Windows Server 2012 R2 is no longer supported. You can migrate your workloads to Windows Server 2016 or 2019, which are in the mainstream support phase.
|
OS architecture |
Source OS |
Target OS |
|
x86 |
Windows Server 2012 R2 Standard 64-bit (Chinese/English) |
|
|
Windows Server 2012 R2 Datacenter 64-bit (Chinese/English) |
Windows Server 2016
|
OS architecture |
Source OS |
Target OS |
|
x86 |
Windows Server 2016 Standard 64-bit (Chinese/English) |
|
|
Windows Server 2016 Datacenter 64-bit (Chinese/English) |
Windows Server 2019
|
OS architecture |
Source OS |
Target OS |
|
x86 |
Windows Server 2019 Datacenter 64-bit (Chinese/English) |
Windows Server 2022 Datacenter 64-bit (Chinese/English) |
Limits
-
Cross-language migrations for Windows are not supported.
-
Only specific migration paths are supported.
-
The Windows instance must have at least 2 vCPUs and 2 GiB of memory.
-
The OS migration tool consumes resources by downloading and installing software packages. Before you start a migration, ensure the instance's C drive has at least 20 GiB of free space, and that the amount of free space is greater than the size of the
C:\Windowsdirectory. -
You cannot migrate an OS while a snapshot is being created for the instance. Wait for the snapshot creation to finish before starting the migration.
-
Windows OS migration is supported only in the following regions.
Asia Pacific - China
Asia Pacific - Other
Europe and Americas
Middle East
-
China (Hangzhou)
-
China (Shanghai)
-
China (Qingdao)
-
China (Beijing)
-
China (Zhangjiakou)
-
China (Hohhot)
-
China (Ulanqab)
-
China (Shenzhen)
-
China (Heyuan)
-
China (Guangzhou)
-
China (Chengdu)
-
China (Hong Kong)
-
China (Wuhan-Local Region)
-
Japan (Tokyo)
-
South Korea (Seoul)
-
Singapore
-
Malaysia (Kuala Lumpur)
-
Indonesia (Jakarta)
-
Philippines (Manila)
-
Thailand (Bangkok)
-
Germany (Frankfurt)
-
UK (London)
-
US (Silicon Valley)
-
US (Virginia)
Saudi Arabia (Riyadh)
-
Precautions
Before you migrate an OS, review the following precautions.
|
Migration stage |
Precautions |
|
Before migration |
|
|
During migration |
|
|
After migration |
|
Migration operations
During the migration, the system creates snapshots of all cloud disks on the ECS instance to back up data. These snapshots are billed on a pay-as-you-go basis. For more information, see Billing.
Quick migration (Recommended)
If your instance was purchased before December 1, 2017, created from a custom image that you uploaded, or is a third-party cloud server, you must install the Cloud Assistant Agent on the ECS instance to use this method. ECS instances created from public images after December 1, 2017 have the required Cloud Assistant Agent pre-installed by default. You can ignore this note.
-
Go to the Operating System Migration page in the SMC console.
-
On the OS Migration page, click Start Migration.
-
In the OS Migration dialog box, select the ECS instance to migrate by its instance ID and region, and then click Pre-check.
-
In the OS Migration dialog box, the system automatically performs a pre-check. The check takes about 10 seconds.
-
If the pre-check status changes from
to
, the pre-check is successful. -
If the pre-check status changes from
to
, the pre-check failed. Follow the on-screen instructions to resolve the issue and then try again.
-
-
Carefully read the notes for operating system migration, select I acknowledge and accept these risks and authorize Alibaba Cloud to create snapshots for all disks on the instance., and then click Next.
Confirm that the Pre-check result for the instance is Ready.
-
In the Operating System dialog box, select a target operating system as needed.
-
Migrate to the same target operating system: If you perform a batch migration, you can migrate multiple instances to the same operating system.
-
Select a target operating system for each instance: If you perform a batch migration, you can migrate multiple instances to different operating systems as needed.
-
-
Click Check Migratability to view the migration check result.
The check takes about 30 seconds.
-
: The operating system can be migrated. -
: The operating system cannot be migrated. Follow the on-screen instructions to view the reason.
-
-
Click Migrate.
View the progress of the operating system migration on the OS Migration page.
WarningDuring the operating system migration, do not manually stop, restart, or release the ECS instance, or perform these operations by using O&M scripts. Otherwise, the migration fails.
Step-by-step migration
Step 1: Import the migration source
A migration source is a physical server, VM, or instance from another cloud platform that you want to migrate.
Import a migration source with one click using the command line (Recommended)
-
The source server must have public network access. If the source server is behind a firewall, see What are the SMC service domains? to obtain the SMC endpoints and ports, and then add them to your firewall allowlist.
-
If your source server cannot access the public network or you want to use a private network for a faster migration, see Private network migration.
-
Go to the Operating System Migration page in the SMC console.
-
On the OS Migration page, click Import Source Servers.
-
Configure the parameters as prompted and copy the activation code command. The following table describes the parameters.
Parameter
Description
Migration Source Type
ECS Instance.
Import Method
Select Use CLI to Import Server.
Migration Source Quota
The number of migration sources that can be activated by the activation code. Valid values: 1 to 1,000. Default value: 200.
Validity Period
The validity period of the activation code, in days. Valid values: 1 to 90. Default value: 90.
Activation Code
Generate the activation code and copy the command:
-
Click Generate.
-
Click the Windows PowerShell tab.
-
Click Copy to copy the activation code command.
-
-
Import the migration source.
-
Log on to the Windows source server.
-
Open Windows PowerShell with administrator privileges.
-
Paste and run the copied command to import the migration source.
$(New-Object System.Net.WebClient).DownloadFile('https://p2v-tools.oss-cn-hangzhou.aliyuncs.com/smc/China_Mainland/run_smc_client.ps1', 'run_smc_client.ps1'); .\run_smc_client.ps1 -accesstokenid at-bp1bq****94dnpodl1cm -accesstokencode xxxxxxIf you receive a message similar to
Import Source Server [s-bp19rlidl3mwuptc****] Successfully!, the migration source has been successfully imported.If the command fails to run, see What do I do if a command fails to run when I import a Windows migration source by using the command line?.
-
-
On the OS Migration page of the SMC console, check the status of the migration source in the Real-time Migration Status column.
-
If the status is Migration SourceOnline, the import was successful.
-
If the status is anything else, the import has failed. See the following solutions to resolve the issue, and then import the data again.
-
Troubleshoot using console error messages or log files in the SMC client directory (default: C:\smc).
-
For information about common issues and solutions, see SMC FAQ and Troubleshooting.
-
-
Import a migration source using the SMC client
For more information about the SMC client, see SMC client guide.
-
Go to the Operating System Migration page in the SMC console.
-
On the OS Migration page, click Import Source Servers.
-
On the Import Migration Source page, configure the parameters. The following table describes the parameters.
Parameter
Description
Migration Source Type
ECS Instance
Import Method
Select Use Client to Import Server.
Description
Under Description, download the corresponding SMC client based on the operating system (Linux or Windows) and architecture (32-bit or 64-bit) of the source server.
-
Import the migration source.
ImportantDo not close the SMC client during the migration. Otherwise, the migration source loses its connection to the SMC console and the migration fails.
-
Use a remote connection tool that supports file transfer, such as WinSCP, to upload the SMC client to the Windows source server.
-
On the Windows source server, use the system's built-in decompression tool or a third-party tool to decompress the SMC client package.
-
In the folder for the SMC client version that matches your server's system, double-click the go2aliyun_client.exe application.
When prompted for administrator privileges, click OK.
-
Obtain an activation code or an AccessKey pair.
-
(Recommended) Obtain an activation code: In the Description section of the SMC console, click Generate and copy the activation code.
-
Obtain an AccessKey pair: An AccessKey pair consists of an AccessKey ID and an AccessKey secret. If you have not created one, see Create an AccessKey pair.
-
-
As prompted, enter the values for
access_token_idandaccess_token_code, and then pressEnter.When you receive a message similar to
Import Source Server [s-bp18x8751kgz2oyh****] Successfully!, the migration source has been successfully imported.
-
-
On the OS Migration page of the SMC console, check the status of the migration source in the Real-time Migration Status column.
-
If the status is Migration SourceOnline, the import was successful.
-
If the status is anything else, the import has failed. See the following solutions to resolve the issue, and then import the data again.
-
Troubleshoot using console error messages or log files in the SMC client directory (default: C:\smc).
-
For information about common issues and solutions, see SMC FAQ and Troubleshooting.
-
-
Step 2: Configure the migration
-
In the Actions column of the migration source that you want to manage, click Start Migration.
-
In the Migration Settings dialog box that appears, configure the parameters.
The following section describes the OS migration parameters:
-
Current Operating System: The current operating system is displayed by default and cannot be changed. For example: Windows Server 2008 R2 64-bit (Simplified Chinese).
-
Destination Operating System: Select a destination operating system from the drop-down list. For example: Windows Server 2012 R2 Datacenter 64-bit (Simplified Chinese).
-
-
Click Start Migration. In the Migrate Operating System dialog box that appears, carefully read the notes and click I Confirm That I Understand.
-
On the OS Migration page, check the real-time migration status.
WarningDuring the OS migration, do not manually stop, restart, or release the Windows instance. Do not use O&M scripts to perform these operations. Otherwise, the OS migration will fail.
Verify the migration result
Resource cleanup
During migration, Server Migration Center (SMC) creates a pay-as-you-go snapshot named SMC_Backup_Snapshot_XXX to back up the data on the cloud disk of an ECS instance. If you no longer need this snapshot, delete it promptly to avoid unnecessary charges. For more information, see Delete a snapshot.
: The operating system cannot be migrated. Follow the on-screen instructions to view the reason.