Show
Performing an in-place upgrade of a virtual machine (VM) instance that is running an earlier version of Windows Server can be a pragmatic way to modernize your infrastructure and to mitigate the risks of approaching the end of the support lifecycle of Windows Server versions. Before you decide to use an in-place upgrade to migrate to a newer version of Windows Server, be aware of the following limitations:
Depending on the workload running on your Windows Server instance, you can reduce downtime and risk by pursuing different approaches.
Product keysA Windows Server product key is valid for only a specific version; when you perform an upgrade to a later version of Windows Server, you must supply a new product key. There are two primary scenarios:
To perform the upgrade, you need an installation media. There are two primary scenarios:
Other prerequisitesBefore you begin your upgrade, review the Microsoft documentation about prerequisites and potential limitations for the version of Windows Server you are planning to upgrade to: Perform the in-place upgradeThe following sections guide you through the process of upgrading your VM instance. Create a snapshotBefore you start the upgrade, we recommend that you create a snapshot of your VM instance, so that you can revert to a safe state in case anything goes wrong: Prepare your Windows Server configurationVerify the configuration of your Windows Server VM instance: Before you can perform the upgrade, attach the necessary installation media to the VM instance. The right media to use depends on your scenario:
To attach the volume license installation media provided by Google, follow these steps:
If you are upgrading a VM instance that is based on an imported disk or image, attach the custom installation media as an additional disk:
Start the upgradeBy default, Windows Setup prompts you for input at various points during an upgrade. Because you can't connect to the VM instance by using RDP during the upgrade and therefore can't provide any input, run the upgrade in unattended mode.
Run upgrade.ps1 to start the Windows upgrade. The script completes the following steps: powershell -ExecutionPolicy Bypass -File upgrade.ps1 -SetupExePath SETUP-PATH -ProductKey PRODUCT-KEYReplace the following:
The -ProductKey parameter is only required if you are upgrading a VM instance for which you brought an existing license (BYOL). On the Select Image screen, select the configuration that matches your current configuration:
It might take several minutes for the setup to initialize. The upgrade process might issue the following warning. If so, you can ignore it: [package name] or a newer version is already installed on the system Note: The system can become temporarily unresponsive while installing the netkvm driver. If this happens, don't close the RDP connection or stop the VM instance unless the system is unresponsive for more than 5 minutes. If you do lose RDP connectivity, wait approximately 5 minutes before you reconnect to the VM instance.Note: The setup wizard might require you to restart the system first. In this case, restart the VM instance and run Windows Setup again, using the same command.After about 5 minutes, the machine reboots, and RDP disconnects. Observe the upgrade processDepending on the machine type of your VM instance and your Windows Server configuration, the upgrade might take between 10 and 60 minutes to complete. During that time, you can observe the status through the serial port output:
Perform post-upgrade stepsYou can now connect to the VM instance to verify that the upgrade has been successfully completed.
Detach the installation diskYou can now detach the installation disk from the VM instance:
Troubleshoot the in-place upgradeWhile running Windows Setup, you can't connect to the VM instance with RDP. If you suspect that the upgrade failed or is not progressing, use the following approaches, in order, to diagnose the situation: Check the serial port outputTo check the progress of the upgrade process, view the serial port output of the VM instance:
During the upgrade, you should observe four reboots. If you don't observe any progress for more than 30 minutes after the first reboot, it is likely that the upgrade failed. Check CPU and I/O metricsRunning a Windows Server upgrade is a CPU and disk I/O intensive operation. By checking the CPU and I/O metrics, you can get an indication for whether the setup is progressing. View the CPU and I/O metrics in the Google Cloud console:
Connect to the Emergency Management Services consoleBoth during and after running Windows Setup, you can connect to the Emergency Management Services (EMS) console. Using the EMS console, check the Windows Setup log files and the event log for indications that the upgrade is still progressing or for information about any errors that might have occurred. Connect remotely by using WinRMIf connecting by using RDP or EMS fails, you can try using WinRM to establish a remote PowerShell session:
Analyze log files offlineIf you can't connect to the instance by using Windows Remote Management (WinRM), you can cancel the upgrade and analyze the log files from a different VM instance. To do this, follow these steps:
Troubleshoot RDPFor information about troubleshooting RDP, see Troubleshooting RDP. Troubleshoot your Windows Server instancesFor information about troubleshooting your Windows Server instances, see Tips and troubleshooting for Windows instances. To avoid incurring further costs after you have completed this process, delete the installation disk. Delete the installation diskYou can create an installation disk based on the Google-provided image at any time. If you don't plan to upgrade more VM instances in the same zone, delete the installation disk:
|